@(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" /> |
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