- Home
- Forum
- ASP.NET MVC
- how to use check/uncheck All option using Batch Editing Mode in ejgrid
how to use check/uncheck All option using Batch Editing Mode in ejgrid
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.
|
@(Html.EJ().Grid<object>("FlatGrid") .Datasource((IEnumerable<object>)ViewBag.datasource) .AllowSorting() .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.Batch).AllowEditOnDblClick(false);}) .ToolbarSettings(toolbar => { toolbar.ShowToolbar().ToolbarItems(items => { items.AddTool(ToolBarItems.Add); items.AddTool(ToolBarItems.Edit); items.AddTool(ToolBarItems.Delete); items.AddTool(ToolBarItems.Update); items.AddTool(ToolBarItems.Cancel); }); }) .AllowPaging() .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.
Regards,
Prasanna Kumar N.S.V
- 1 Reply
- 2 Participants
-
GA Ganga
- Sep 30, 2015 05:04 AM UTC
- Oct 1, 2015 09:32 AM UTC