Hi, This should be quite simple but I could not find any code examples. I need to grab some values from the Parent row based on an "ActiveRow" in one of the Parent's Child rows. I did not see anything hanging off of the GridRow Class that would gain access to a Parent row.
Any help would be greatly appreciated! Thanks
Hi jdymond,
I would suggest that you try accessing the parent row in the ActiveCellChanged event. You could use something like the following code:
protected void WebHierarchicalDataGrid1_ActiveCellChanged(object sender, ActiveCellEventArgs e)
{
string text = ((Infragistics.Web.UI.GridControls.GridRecord)(((Infragistics.Web.UI.GridControls.ContainerGrid)(sender)).ParentRow)).Items[1].Value.ToString();
}
If you have any further questions please let me know.
Sorry, I should have been a little more clear. I have a label that looks like a button outside of the grid that will add a child row to the grid using client side JavaScript. As you know, in order to add a row, you need to establish a relationship between the child row and the Parent row in order to do an add on the client. This is why I need access to the Parent row in order to obtain some information from a few hidden columns. These will be used when populating my cellValues Array.
// Add row.var childGrid = _getChildGridView();childGrid.get_rows().add(cellValues);
Thanks. - Jason