while disabling kendo grid popup editor cascading dropdownlist using ajax its disable before assign value and then getting enabled while value assigned to it
Here my Kendo Grid <pre>@(Html.Kendo().Grid<AttendanceCentralization.Models.DepartmentViewModel> () .Name("Grid") .Columns(columns => { columns.Bound(o => o.Dept_Id).Hidden(); columns.Bound(o => o.Dept_Name).Title("Name"); columns.Bound(o => o.Country_Name).Title("Country"); columns.Bound(o => o.Loc_Name).Title("Location"); columns.Bound(o => o.Sec_Name).Title("Section"); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(250); }) .ToolBar(toolbar => toolbar.Create()) .Pageable() .Sortable() .Editable(ed => ed.Mode(GridEditMode.PopUp).TemplateName("DepartmentTemplateView")) .Filterable() .Groupable() .Events(e => e.Edit("onEdit") ) .HtmlAttributes(new { style = "height:500px;" }) .DataSource(dataSource => dataSource .Ajax() .PageSize(6) .Model(model => model.Id(p => p.Dept_Id)) .Read(read => read.Action("Read", "Home", new { PageTag = "Department" })) .Update(update => update.Action("CreateDepartment", "Home", new { Mode = "Edit" })) .Create(create => create.Action("CreateDepartment", "Home", new { Mode = "Add" })) .Destroy(destroy => destroy.Action("CreateDepartment", "Home", new { Mode = "Delete" })) ) ) function onEdit(e) { debugger; var ddlc = $("#Dept_CountryId").data("kendoDropDownList"); var ddlLoc = $("#Dept_LocId").data("kendoDropDownList"); var ddls = $("#Dept_SecId").data("kendoDropDownList"); var DeptId = $("#Dept_Id").val(); debugger; $.ajax({ type: "POST", url: '@Url.Action("GetDeptReference", "Home")', data: { "DeptId": DeptId }, dataType: 'json', success: function (data) { debugger; if (data.success == true) { ddls.enable(true); ddlc.enable(true); ddlLoc.enable(true); } else { ddls.enable(false); ddlc.enable(false); ddlLoc.enable(false); } } }); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)