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
425
How to get the parent row from the selected child in WHG
posted

Can I get the parent row of the selected row in code behind?

Parents
No Data
Reply
  • 8160
    posted

    Hello vishvanatha_achary,

    set RowSelectionChanged AutoPostBackFlag to true and handle RowSelectionChanged event:

                <Behaviors>
                    <ig:Selection CellClickAction="Row" RowSelectType="Single">
                        <AutoPostBackFlags RowSelectionChanged="true" />
                    </ig:Selection>
                </Behaviors>

     ...

        protected void WebHierarchicalDataGrid1_RowSelectionChanged(object sender, Infragistics.Web.UI.GridControls.SelectedRowEventArgs e)
        {
              Infragistics.Web.UI.GridControls.ContainerGridRecord parentRow = ((Infragistics.Web.UI.GridControls.ContainerGrid)(sender)).ParentRow;  
        }
    

     

    Hope this helps
     

     

Children
No Data