We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Editmode off doesnt work in checkbox case for batchedit mode

Dear Support team,

I was working on ejgrid for ej1 vs 14.2.0.28 bacthmode. But when the editmode is off, I can change the checkbox. Although save button is not enabled, it is confusing for user as checkbox is being changed. Is there any way to make this checkbox disabled if editmode off?

Here is my code example:


Regards,
Talha

1 Reply

PK Padmavathy Kamalanathan Syncfusion Team November 7, 2019 07:34 AM UTC

Hi Talha,

Thanks for contacting Syncfusion Forums.

QUERY:  Is there any way to make this checkbox disabled if editmode off?

From your query we understand that the checkbox column is editable even when "allowEditing" is set to false when the "editMode" is set as "batch". We can disable the checkbox by setting "disabled" property of checkbox to true in the dataBound event of grid.

Please check the below sample,

Please check the below code snippet,

    <script type="text/javascript">

        $(function () {
            $("#Grid").ejGrid({
                dataBound: function(args){
                   if(!this.model.editSettings.allowEditing && this.model.editSettings.editMode == "batch") {
                     $('input[type="checkbox"]').attr("disabled", true);
                   }
                  },
                  -------

            });
        });
    </script>

If you have further queries, please get back to us.

Regards,
Padmavathy Kamalanathan


Loader.
Live Chat Icon For mobile
Up arrow icon