Intersoft WebGrid Documentation
How-to: Disable a child table's column in a specific row using OnChildRowExpand
See Also Send comments on this topic.

Glossary Item Box

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

  1. Select WebGrid's instance and press F4.
  2. In Layout Settings, select ClientSideEvents, then set OnChildRowExpand to WebGrid1_OnChildRowExpand.
  3. Write the following function in OnChildRowExpand client side event:

    JavaScript Copy ImageCopy 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;
    }
    

  4. Run the project.

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.