Hi All,
I am using one grid and dropdown list. whenever the dropdown list changes then grid should get reloaded with new. it is working fine for me if i use below code in the drop down change event, but i have made the default refresh button of grid as true.
Hence when i click on refresh button in grid it is not loading with data for current dataitem selected in dropdown. it is only loading the which got loaded in grid for the first time.
please reply ASAP , as this is stopping my work.
change: function (e) {
$("#" + gridname).data("kendoGrid").dataSource.read(getAuditparamter("WorkDetails"));
}
$('#' + gridname).kendoGrid({
dataSource: {
transport: {
read: {
url: window.environment.siteRootUrl + "url",
data: getAuditparamter(gridName),
dataType: "json",
cache: false
}
},
pageSize: 25,
serverPaging: true,
sort: {
field: "EventDate",
dir: "desc"
}
}
function getAuditparamter(gridname) {
if (gridname == "WorkDetails") {
var ddlTaskName = $("#ddl" + gridName).data("kendoDropDownList").text();
return { id : workId,taskName: ddlTaskName.trim()};
}
}