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

Loading Hierarchy with Same Headers

1 Answer 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
digitall
Top achievements
Rank 1
digitall asked on 02 Dec 2008, 10:16 PM
Is it possible to load a RadGrid with a hierarchy-based object model that retains the same header information? For example, I have a three-level object model that all contain the same properties of Prior, FirstHalf, SubTotal, SecondHalf and Total. The first level object contains those properties and then a collection of the second level set of objects. The second level object contains those same properties and also contains a collection of the third level set of objects which has those same properties (but no children underneath). So..

RootObject
     - Prior
     - FirstHalf
     - Subtotal
     - SecondHalf
     - Total
     - Collection of ChildrenObject

ChildrenObject
     - Prior
     - FirstHalf
     - Subtotal
     - SecondHalf
     - Total
     - Collection of DetailObject

DetailObject
     - Prior
     - FirstHalf
     - Subtotal
     - SecondHalf
     - Total

I want to use the RADGrid to display this hierarchy, but have only one set of headers for all objects. I know I can just not set a header on all the child/detail object grids, but I want everything on child and detail grids to line up with the parent header.

Is this possible?

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 05 Dec 2008, 09:37 AM
Hi,

You can declare the headers to be the same as the master table headers, or alternatively, iterate through the header(s) for the detail tables, and alter the text manually, from the code-behind. As for the alignment of the elements, the following article contains more information on the subject.
I hope this information helps.

Regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
digitall
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or