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

Nested radgrid

1 Answer 324 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alexis
Top achievements
Rank 1
Alexis asked on 07 Jun 2013, 11:05 AM
overall, i would like a nested grid where there is a radio button list column. The column will have an approve option and a reject option if reject is selected all the items in the child grid will automatically inherit that value as well. If the reject button is pushed, also a text box for the parent item and each child item will appear next to the corresponding row. Your help would be so greatly appreciated!!!!

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 12 Jun 2013, 07:23 AM
Hello Alexis,

You can use the following examples for a reference:
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplatedeclarativerelations/defaultcs.aspx

Additionally, you can use any given event of the inner control to access the parent item DataKeyID:
protected void RadGrid2_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    RadGrid grid = sender as RadGrid;
    GridNestedViewItem nestedViewItem = grid.NamingContainer as GridNestedViewItem;
    GridDataItem parentItem = nestedViewItem.ParentItem as GridDataItem;
    string parentDataKeyID = parentItem.GetDataKeyValue("OrderID").ToString();
 
    grid.DataSource = new string[] { parentDataKeyID, "Item 2", "Item 3", "Item 4", "Item 5" };
}

Hope this helps.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Alexis
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or