or
@(Html.Kendo().ComboBox() .Name("Dim1") .DataTextField("Barcode") .DataValueField("Barcode") .Filter(FilterType.StartsWith) .DataSource(action => action.Read(read => read.Action("GetStockLocationsForComboBoxAjax", "StockLocation")).ServerFiltering(true)) .MinLength(3) )<script type="text/javascript"> function onAdditionalData() { return { Barcode: $("#Dim1").val() }; }</script>@(Html.Kendo().ComboBox() .Name("Dim2") .DataTextField("Barcode") .DataValueField("Barcode") .Filter(FilterType.StartsWith) .DataSource(action => action.Read(read => read.Action("GetStockLocationsForComboBoxAjax", "StockLocation").Data("onAdditionalData")).ServerFiltering(true)) .MinLength(3) .CascadeFrom("Dim1") )[HttpGet]public JsonResult GetStockLocationsForComboBoxAjax([DataSourceRequest] DataSourceRequest request, string text, string Barcode)I'm simply trying to fire an event, and it doesn't work. (I'm starting to feel like Kendo is a beta that we pay to test.)
Markup:
@(Html.Kendo().AutoCompleteFor(m => m.EditName) .Events(e => e.Select("alert('test')")) .DataSource(source => source.Read(read => read.Action("GetUsers", "Administration")) .ServerFiltering(true)))<input id="CompanyCode" data-textfield="ItemText" data-valuefield="ItemValue" data-endpoint="http://localhost:8888/Customers/Get" data-selected="40"/> <input id="VendorId" data-textfield="ItemText" data-valuefield="ItemValue" data-endpoint="http://localhost:8888/Vendors/Get" data-cascade="CompanyCode"/> <script src="Content/js/jquery.min.js"></script><script src="Content/js/kendo.all.min.js"></script><script> $(function(){ $('#CompanyCode').each(function(){ var target = $(this); var options = { dataTextField: target.data('textfield'), dataValueField: target.data('valuefield'), dataSource: { transport: { read: target.data('endpoint') } } } target.kendoDropDownList(options); }); $('#VendorId').each(function(){ var target = $(this); target.kendoDropDownList( { dataTextField: target.data('textfield'), dataValueField: target.data('valuefield'), dataSource: { transport: { read: target.data('endpoint'), parameterMap: function(options, operation) { return { companyCode: options.filter.filters[0].value } } }, serverFiltering: true }, cascadeFrom: target.data('cascade'), autoBind: false }); }); });</script>