ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
856 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi
How to find Fieldset id inside Kendo Grid Edit function as i want to enabled it.
Below is my code, i can find in detailInit but not in Edit Function
detailInit function
function detailInit(e) {
var detailRow = e.detailRow;
var model = e.data;
kendo.bind(detailRow, model);
//model.bind('change', function (e) {
// var tr = $('tr[data-uid=' + model.uid + ']');
// // $('#gridMaster').data().kendoGrid.expandRow(tr);
// tr.find('#fsAutoMapp').prop("disabled", true);
//})
GetAutoSizeMappingDetail(model.id, detailRow);
var mRow = detailRow.prev(".k-master-row");
if (mRow[0].className === 'k-master-row k-grid-edit-row' || mRow[0].className === 'k-alt k-master-row k-grid-edit-row') {
detailRow.find('#fsAutoMapp').prop("disabled", false);
}
else {
detailRow.find('#fsAutoMapp').prop("disabled", true);
}
}
Edit Function
edit: function (e) {
localStorage.setItem("ExistingContentSize", e.model.ContentSize);
if (!e.model.isNew()) {
//REMOVED ProductType as MANDATORY TO SUPPORT DEFUALTS
//e.container.find("[name=ProductType]").prop("disabled", true).addClass("k-state-disabled").data("kendoDropDownList").enable(false);
e.container.find("[name=ProductSize]").prop("disabled", true).addClass("k-state-disabled");
}
if(e.model.SizePot !== "UKDisplay"){
e.container.find("[name=ContentSize]").prop("disabled", true).addClass("k-state-disabled");
}
//Enable Display size change only when user created
if (e.model.UserCreated == 0) {
e.container.find("[name=DisplaySize]").prop("disabled", true).addClass("k-state-disabled");
}
$(".k-grid-level01 .k-grid .k-widget .k-master-row").each(function (index) {
$('#gridMaster').data().kendoGrid.collapseRow(this);
});
var tr = $('tr[data-uid=' + e.model.uid + ']');
$('#gridMaster').data().kendoGrid.expandRow(tr);
}