This is a migrated thread and some comments may be shown as answers.

Get the instance of the child grid on the expand changing event of the parent row of the parent grid in the hierarchical grid.

2 Answers 50 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mausami
Top achievements
Rank 1
Mausami asked on 16 Jun 2011, 11:04 AM
Hello Telerik Team,

I am using a Telerik Hierarchical rad grid.
On the expand changing event of a row in the parent grid, how can I get the instance of the child grid ?

Please suggest.

Regards,
Mausami

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 17 Jun 2011, 07:47 AM
Hello Mausami,

You may get the child grid as follows:

private void OnIsExpandedChanged(object sender, RoutedEventArgs e)
        {
            GridViewRow row = e.OriginalSource as GridViewRow;
            if(row != null)
            {
                var childGrid = row.ChildrenOfType<GridViewDataControl>().FirstOrDefault();
            }
        }

However, please in mind that the child grid will be null initially as it has not yet been loaded. So, in case the above approach is not appropriate for you, I would need a bit more details on your particular scenario so that to be able to suggest any further.
 

Greetings,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mausami
Top achievements
Rank 1
answered on 17 Jun 2011, 12:31 PM
Hi Maya,

Thanks for the info.

Regards,
Mausami
Tags
GridView
Asked by
Mausami
Top achievements
Rank 1
Answers by
Maya
Telerik team
Mausami
Top achievements
Rank 1
Share this question
or