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

Radgrid - Bind detail table based on dropdown value of a master row

1 Answer 113 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Venu
Top achievements
Rank 1
Venu asked on 26 May 2017, 08:53 AM

I have a Radgrid containing a dropdown list in template column. On the selected index changed event of the dropdown, I want to bind the detail rows based on the value selected in master row.

Example: if the user selects 1 from the dropdown of master row, I need to have 1 detail row, if user selects 2, I need 2 detail rows.

Please help.

Thanks,

-Venu.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 30 May 2017, 06:16 AM
Hello Venu,

You can achieve this requirement using NestedViewTemplate:
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/hierarchy-with-templates/defaultcs.aspx

Using the SelectedIndexChanged event handler of the combo, you can access the NestedViewItem of the corresponding GridDataItem and find the inner grids using FindControl(). Then, you can set their Visible properties accordingly to display 1, 2 or more detail grids at the same time.

Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Venu
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or