views:

1733

answers:

2

I need to modify the contents of the child rows of a hierarchical Infragistics web grid when it is expanded. I can get the parent row from "e.Row" in the following code. But how do I get its child rows to edit?

For that matter, how can I get the rows from any band other than band 0?

protected void CustomerActivitiesGrid_ExpandRow(object sender, RowEventArgs e)
{
   UltraGridRow expandedRow = e.Row;
}
+2  A: 

It's quite easy, just access the row's rows.

foreach(UltraGridRow childRow in e.Row.Rows)
{
    // your code
}

Subsequently, you can access the children rows of those rows the same way

childRow.Rows

You can also access a specific row using its key

UltraGridRow specificChildRow = e.Row.Rows.FromKey("ChildRowKey");
GoodEnough
Brilliant, thanks. Do you know how to just get all of the rows form band 1?
Baffled by ASP.NET
Get the grid control (FindControl(...) or whatever, then just use grid.Rows)
GoodEnough
A: 

Thanks dude!! It helped.

Sejay