I have a Kendo grid that binds to an XML DataSource. How can I change the DataSource based on the selection of a drop-down list. Example:
var gridDataSource = new kendo.data.DataSource({
transport: {
read: [DropDownListValue] + ".xml",
dataType: "xml"
}
});
gridDataSource.read();
function createGrid(){
var grid = $("#grid").kendoGrid({
dataSource: gridDataSource
}...
};
Where [DropDownListValue] is a dropdown list in my form. In this example, if [DropDownListValue] = 1, the data source will be "1.xml". If [DropDownListValue] = 2, then the data source will be "2.xml".
source
share