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

[Solved] Pivot grid with Detail tables

1 Answer 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Catriona Potter
Top achievements
Rank 1
Catriona Potter asked on 12 Jan 2010, 10:28 AM
I want to provide a defaultDisplay (during development) which will display a single row from a table in a vertical manner. I would like associated detail tables to be presented in the normal horizontal manner.
I've used the PivotGrid examples to display this row as though it is a form. I have autoassigned the columns so that it can display table A, B or C according to some value passed to the form. The data is all provided by a dataset with the appropriate relations set up. I would like Table A to also be able to display its table subA details (using A.Id = SubA.Id).
I programmatically define the detail table because there are various detail tables according to whether Table A, B or C is being displayed.
If I programtatically define the detail table, because the MasterDetailTable has been pivoted, I pick up the incorrect details for the masterKey Values. How can I access the correct values when rows and columns are switched?

Basically can I mix vertical and horitontal RadGrids?

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 15 Jan 2010, 06:20 AM
Hello Catriona,

Thank you for contacting us and for your question.
In this case, there is no easy way to identify the row, once the data has been pivoted.
One option would be to use the DetailTableDataBind event handler, to pass data for the detail table(s). From within this function, you can query the master data item, access its data, and based on this data, fetch records for the detail table. One example of this approach is demonstrated in the following article:

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/detailtabledatabind/defaultcs.aspx

I hope this information helps. If any other questions arise, do let me know.

Sincerely yours,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Catriona Potter
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or