Intersoft WebGrid Documentation
How-to: Remove (+) sign for rows that do not contain child row
See Also Send comments on this topic.

Glossary Item Box

You can remove the (+) sign in rows that do not have any child rows.

In this topic, you will learn how to perform the above scenario.

To remove (+) sign for rows that contain no child row

  1. Add the following code under InitializeRow event handler.

    C# Copy ImageCopy Code
    protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
    {
      if (e.Row.GetChildTableRows(e.Row.Table.ChildTables[0]).Count == 0)
      e.Row.ChildNotExpandable = true;
    }
    

  2. Compile and run the WebForm.

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.