Hi
I use the Infragistics WebHierarchicalDataGrid, and when i select a row, i need to acces to the selected row and to the Parent Row.
So i have a RowSelectionChanged event.
When e.CurrentSelectedRows[0].index:--> this give me the rowId of the Child
How do to access to ParentRowID????
I have found some script on the forum http://es.infragistics.com/community/forums/p/78312/396593.aspx#396593, but this one is not working
I have the following error "Unable to cast object of type 'Infragistics.Web.UI.GridControls.ContainerGrid' to type 'Infragistics.Web.UI.TemplateContainer'."
thank's
Christophe
Hello Christophe,
Thank you for contacting Infragistics!
I have done some looking into this matter and the child grid has access to its parent row through the following property:
http://help.infragistics.com/doc/ASPNET/2014.2/CLR4.0/?page=Infragistics4.Web.v14.2~Infragistics.Web.UI.GridControls.ContainerGrid~ParentRow.html
Please let me know if you have any further questions concerning this matter.
Hello
I' am afraid, i do not understand do to use this.
So in my event RowselectionChanged
I do the following
ContainerGridRecord ContRecord=(ContainerGridRecord) e.CurrentSelectdRows[0]
but here i am always pointing to the selected row.
So how to get the parent Row to get information from the parent?
Hello Strich,
Thank you for the update. It appears to get the parent row from the child grid has some additional code. You can use the following code to get the parent row index:
((Infragistics.Web.UI.GridControls.ContainerGridRecordCollection)(e.CurrentSelectedRows[0].Owner)).ControlMain.ParentRow.Index