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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to use check/uncheck All option using Batch Editing Mode in ejgrid

Thread ID:





120643 Sep 30,2015 05:04 AM UTC Oct 1,2015 09:32 AM UTC ASP.NET MVC 1
Tags: Grid
Asked On September 30, 2015 05:04 AM UTC

Sample code:
While using batch  editing mode in ejgrid check and uncheck all option is not working.. how to set check and uncheck all option in ejgrid


       .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.Batch).AllowEditOnDblClick(false); })
         .FilterSettings(d => d.FilterType(FilterType.Excel))
        .ScrollSettings(scroll => { scroll.Height(250).Width(450); })
        .Columns(col =>
        //  col.HeaderText("View1").Template("<input type='checkbox' class='check' />").HeaderTemplateID("#headerTemplate").EditType(EditingType.Boolean).TextAlign(TextAlign.Center).Width(100).Add();



    $("#DepSaveBtn").on("click", function () {

            var ProjObj1 = $("#DepGeneralIns").ejGrid("instance")
            var GridCar1 = $("#DepGeneralIns").ejGrid("model");
            var data1 = JSON.stringify(GridCar1.dataSource);
            //if ($("#generalins").val() != "") {

                    type: "POST",
                    url: "@(Url.Action("Save", "GeneralInstruction"))",
                    data: { data: data1, GeneralInstrMsg: $("#generalins").val(), setflag: $('#SetFlagVal').val(), Chkbx: $('#ChkAndUnCheck').prop('checked') },
                    success: function (alertmsg) {




Prasanna Kumar Viswanathan [Syncfusion]
Replied On October 1, 2015 09:32 AM UTC

Hi Ganga,

Thanks for contacting Syncfusion support.

We have analyzed your code and found that you have used header template in your sample. We suggest you to render the header template as in the below code example.

The header Template is used to add a template in the header element of the particular column.




        .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.Batch).AllowEditOnDblClick(false);})

            .ToolbarSettings(toolbar =>


                toolbar.ShowToolbar().ToolbarItems(items =>










        .Columns(col =>


            col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).TextAlign(TextAlign.Right).Width(75).Add();

            col.Field("CustomerID").HeaderText("Customer ID").Width(90).Add();

            col.Field("ShipCity").HeaderText("Ship City").TextAlign(TextAlign.Right).Width(90).Add();

            col.Field("OrderDate").HeaderText("Order Date").HeaderTemplateID("#datetemplate").TextAlign(TextAlign.Right).Width(100).Format("{0:MM/dd/yyyy}").Add();

            col.Field("ShipCountry").HeaderText("Ship Country").Width(110).Add();

            col.Field("EmployeeID").HeaderText("Emp ID").HeaderTemplateID("#employeetemplate").TextAlign(TextAlign.Right).Width(90).Add();


        .ClientSideEvents(eve => { eve.ActionFailure("Failure"); })  


<script id="employeetemplate" type="text/x-jsrender">

    <input type="checkbox" class="check" />

Please confirm the following details

1.       Do you need to perform any operation in header template column when the checkbox is checked/ unchecked?

2.       You have mentioned that need to check and uncheck all options in the Grid. Please provide more details about the options in the Grid.

Prasanna Kumar N.S.V              


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon