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

Problem with expanding of hierarchical grid

1 Answer 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ketaki Indurkar
Top achievements
Rank 1
Ketaki Indurkar asked on 27 Jul 2010, 03:35 PM
Hi,

I have a hierarchical radgrid. When in edit mode, I need to expand the hierarchy on the selected index change of a dropdown which is  in one of the columns of that row. Also I need that a roundtrip to the database should happen whenever the selected index of the dropdown changes. Currently I am doing a postback on the selected index change. This works fine only when the user selects a value in the dropdown once. The child gets loaded from the database in the DetailTableDataBind method. But if the user again changes the value in the dropdown of the parent row, the row collapses due to the postback and the DetailTableDataBind method is not called since the hierarchy is in collapsed mode. 
So basically what i need to do is that expand the hierarchy from client side on every selected index change of the dropdown and also fire the DetailTableDataBind method after the expand.

Can anybody suggest any solution for this? 

An early response will be appreciated. 

Thanks & Regards,
Ketaki

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 30 Jul 2010, 02:40 PM
Hello Ketaki,

You can alwasy keep the parent item expanded by setting its Expanded property to "true". For example, you can intercept the ItemDataBound event of the grid, check if the incoming item is a GridDataItem object and has the corresponding data key and set its Expadned property to true. Where and how you should exapnd the item, however, depends on your particular implementation.

Hope it helps.

All the best,
Tsvetoslav
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
Tags
Grid
Asked by
Ketaki Indurkar
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or