Intersoft WebGrid Documentation
How-to: Expand/collapse child row
See Also Send comments on this topic.

Glossary Item Box

Use ExpandChildRow function to expand/collapse WebGrid child row in client side.

This topic will show you how to expand/collapse WebGrid's child row.

To expand/collapse WebGrid's child row

  1. Drag WebGrid instance into the WebForm.
  2. Add a client side function on your code.
  3. You can expand/collapse grid's child row by simply using:

  4. JavaScript Copy Code
    function expandChildRow()
    {
    var WebGrid1 = ISGetObject(controlId);
    var row = WebGrid1.RootTable.GetRowByKeyValue("ANATR");
    row.ExpandChildRow(true);
    return true;
    }
    function collapseChildRow()
    {
    var WebGrid1 = ISGetObject(controlId);
    var row = WebGrid1.RootTable.GetRowByKeyValue("ANATR");
    row.CollapseChildRow(true);
    return true;
    }

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.