[index.cshtml]
<ejs-grid id="Grid" allowPaging="true" actionComplete="complete" showColumnChooser="true" allowSelection="true" toolbar="@(new List<string>() {"Add", "Edit", "Update", "Delete","ColumnChooser" })" actionBegin="actionBegin">
<e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true" mode="Normal"></e-grid-editSettings>
<e-data-manager url="/Home/UrlDataSource" adaptor="UrlAdaptor" insertUrl="/Home/Insert" updateUrl="/Home/Update" removeUrl="/Home/Remove"></e-data-manager>
<e-grid-selectionsettings mode="Row" type="Multiple" checkboxOnly="true" checkboxMode="Default"></e-grid-selectionsettings>
<e-grid-columns>
. . . .
</e-grid-columns>
</ejs-grid>
<script type="text/javascript">
function complete(args) {
if (args.requestType == "columnstate") {
args.columns[0].visible = true; //we have enable visibility for checkbox column while hide any column in columnchooser
}
}
</script> |