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?
我需要在扩展时修改分层Infragistics Web网格的子行的内容。我可以在以下代码中从“e.Row”获取父行。但是如何让其子行进行编辑?
For that matter, how can I get the rows from any band other than band 0?
就此而言,如何从波段0以外的任何波段获取行?
protected void CustomerActivitiesGrid_ExpandRow(object sender, RowEventArgs e)
{
UltraGridRow expandedRow = e.Row;
}
1 个解决方案
#1
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");
#1
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");