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

Question on ColumnGroups: is there anyway to build from the datasource?

3 Answers 24 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Stargazer
Top achievements
Rank 2
Stargazer asked on 25 Nov 2009, 12:53 PM
Hello!

Well, what I'm looking for is a way to take advantage of the ColumnGroups feature of the grid, but doing so in an automated manner. I have a query that returns me a bunch of records. Those records are hierarchical for each person, and represent a tree of grades.

I used it to populate a radtreeview with ParentIDMember and it works just great! I also use a similar query to get the data to populate a crosstab on a report to print that info and it do work nicely.

What I would like to achieve is something as the crosstab, where we just have to create the groups and then indicate what is the data source. Everything happens automagically...Little coding is needed on my part.

In the case os the datagrid, I have to create and populate all the columngroups "by hand", resulting in some big and ugly coding.

Any suggestions?

3 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 25 Nov 2009, 02:44 PM
Hello Stargazer,

That's interesting. Could you please specify in detail the result and the data. Currently RadGridView can't build its column groups automatically. However, we will research the case further. I am looking forward to your reply.

All the best,
Jack
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.
0
Stargazer
Top achievements
Rank 2
answered on 25 Nov 2009, 03:22 PM
Hi Jack.

Gladly. :) My data is as follows (I'm putting a link to imageshack so you can see a picture of the final result):

1. - There is a group of students;
2. - They all have grades;
3. - The grades are hierarchical, based on a tree of criteria;

From top to bottom, as a simple example of one possible tree:

Course
     Subject
         Subject Average
             Year
                 1st Term
                 2nd Term
                     Test 1
                     Test 2
                     Test 3
                 3rd Term


After some "heavy" processing, it's supposed to get something like this, on RadGridView

|                              Course                                |
|-----------------------------------------------------------|
|                              Subject                                |
|-----------------------------------------------------------|
|                        Subject Average                        |
|-----------------------------------------------------------|
|                               Year                                   |
|-------------|-------------------------------|--------------|
| 1st Term |             2nd Term           |  3rd Term |
|-------------|-------------------------------|--------------|
|                |  Test 1 | Test 2 | Test 3  |                 |
|-------------|----------|----------|----------|--------------|

For a more visual and clear representation, go

here


P.S.: By the way, just a note... The link button on the toolbar here do not work in Firefox 3.5.5
0
Accepted
Jack
Telerik team
answered on 27 Nov 2009, 09:23 AM
Hi Stargazer,

Thank you for the detailed description. Now I understand what you want to achieve. As I said, currently you can create this kind of layout only with code. We will take this in account when planing our future versions. Also, thank you for the note about the button. I updated your Telerik points for the feedback. If you have any other questions, don't hesitate to ask.

Kind regards,
Jack
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
GridView
Asked by
Stargazer
Top achievements
Rank 2
Answers by
Jack
Telerik team
Stargazer
Top achievements
Rank 2
Share this question
or