$(document).ready(function () {
var combobox = $("#Id").data("kendoComboBox");
combobox.dataSource.data(jsonData);
});
I am trying to set the datasource for the combobox on document ready, but, i can't set the combobox is always undefined...
I am declaring combobox in razor partial view..
@(Html.Kendo().ComboBoxFor(model => model.Id)
.HtmlAttributes(new { style = "width: 100%;" })
)
the comobo element is there...but the datasource for the combo is undefined..so may i need to init the datasource event on load? how can i do this?