Find Div Id or Fieldset id inside Kendo Grid edit function

Shabbir Daruwala 176 Reputation points
2021-09-03T14:37:48.83+00:00

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);



            }
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,386 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful