Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1329
Need access to the Parent row from an ActiveRow.
posted

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

Parents
No Data
Reply
  • 37874
    posted

    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.

Children