This walkthrough will show you how to use OnColumnGroup client side event.
In this topic, you will learn the basic thing on how to prevent grouping on specific column using OnColumnGroup.
To prevent grouping on spesific column using OnColumnGroup
- Select WebGrid's instance and press F4.
- In Layout Settings, select ClientSideEvents, then set OnColumnGroup to WebGrid1_OnColumnGroup.
- Write the following function in OnColumnGroup client side event:
JavaScript Copy Code function WebGrid1_OnColumnGroup(controlId, columnObject) { var WebGrid1 = ISGetObject(controlId); var colName = columnObject.Name; if(colName == "CustomerID") { return false; } return true; }
- Run the project.
References
OnColumnGroup Property
Other Resources
Walkthrough Topics
How-to Topics