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

[Solved] RadGrid Child Table Issue

1 Answer 116 Views
Grid
This is a migrated thread and some comments may be shown as answers.
VS
Top achievements
Rank 1
VS asked on 11 Jun 2009, 07:10 AM
Hi,

I have a radgrid with master-child relationship.
When i click on a button, i need to loop thru the grid and get the parent items first and then its related child items.

foreach

 

(GridDataItem dataItem in uiProtectionGroupProductsGrid.Items)

 

{

 

        if (dataItem.OwnerTableView.Name != "childtablename")

 

         {

            obj =

new ProtectionGroupProductsDto();

 

            protectionGroupProductsDto.Id =

Convert.ToInt32(dataItem["Id"].Text);

 

            protectionGroupProductsDto.name =

Convert.ToString(dataItem["name"].Text);

 

            protectionGroupProductsDto.age=

Convert.ToInt32(dataItem["age"].Text);

 

 

            
            //HERE I WANT TO LOOP THE Child table of the above parent item

 

}

 

 

}

Does anyone have any idea on this?

Regards

Sujith

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 11 Jun 2009, 07:27 AM
Hello Sujith,

You can refer the following help article which explains how to loop through detail tables in a hierarchical Grid.
Traversing detail tables/items in Telerik RadGrid

Regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
VS
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or