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

will HierarchyDefaultExpanded work in my situation?

1 Answer 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sf
Top achievements
Rank 1
sf asked on 15 Apr 2010, 10:04 AM
I have a radgrid with 2 GridTableViews in the detailtable. The mastertableview is bound to a dataview at runtime on a button click event, I also setup the OnNeedDataSource event to make sure the datasource of the grid is always present. At runtime everything works fine and i can expand all records no problem. However once I set HierarchyDefaultExpanded = true and click on the button again I receive an error:

Line: 4723
Error: Sys.WebForms.PageRequestManagerServerErrorException: There was a problem extracting DataKeyValues from the DataSource. Please ensure that DataKeyNames are specified correctly and all fields specified exist in the DataSource.

so if a radgrid has a detailtable which contains multiple GridTableViews the HierarchyDefaultExpanded will not work, am I right?

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 19 Apr 2010, 03:59 PM
Hello sf,

Could you please elaborate a bit on how is the grid bound? In case you have handled the NeedDataSource and the DetailTableDataBind events as it is done here, then make sure you are not setting the grid table view data source outside the events and that you are calling the DataBind() method. On button click you can call the grid Rebind() method which will fire the above mentioned events and the grid will be bound properly. Also in case of the programatic data-binding of hirarchical grid, you do not need any ParentTableRelations, as the datasource for the nested table views should be assigned directly in the DetailTableDataBind event.  

Check it out and let me know how it goes.

All the best,
Iana
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
sf
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or