This walkthrough will show you how to use OnChildRowExpand client side events.
In this topic, you will learn the basic thing on how to disable a child table's column using OnChildRowExpand.
To disable a child table's column in WebGrid
- Select WebGrid's instance and press F4.
- In Layout Settings, select ClientSideEvents, then set OnChildRowExpand to WebGrid1_OnChildRowExpand.
- Write the following function in OnChildRowExpand client side event:
JavaScript Copy Code function WebGrid1_OnChildRowExpand(controlId, tblName, rowIndex, rowEl) { var WebGrid1 = ISGetObject(controlId); var selObj = WebGrid1.GetSelectedObject(); var row = selObj.ToRowObject(); var cell = row.GetCells(); if(cell[8].Text=="UK") { return false; } return true; }
- Run the project.
References
OnChildRowExpand Property
Other Resources
Walkthrough Topics
How-to Topics