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

Creating grouping in treelistview

9 Answers 189 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Unni Kumar
Top achievements
Rank 1
Unni Kumar asked on 22 Jul 2010, 07:11 PM
I have a collection of the objects with following data structure

School
Department
Name
Age
Sex
Grade

I would like to create a listviewtree control, where I display only Name, Age, Sex and Grade. It will be grouped on School and then Department when grouped it shows avarage grade score and avarage age for school or by department. I know I can use gridview to achive this, but I do not like the way the grouping work in it. I like to have tree look.

I tried with ChildTableDefinition, it creates lots of empty rows when I expand. What is the correct way to achive this?

Thanks.

9 Answers, 1 is accepted

Sort by
0
Unni Kumar
Top achievements
Rank 1
answered on 22 Jul 2010, 08:22 PM
I converted the data to be homogenous and now it works. Only thing I did not like in that approach is that, I had to walk through my collection and generate the dummy object for the parent objects in which I had to do avg calculation in hte code behind.
0
Chris Thierry
Top achievements
Rank 1
answered on 17 Aug 2010, 02:47 AM
Hi,
I tried to do the same but I'm not able to find the solution, I have the same problem, empty rows on child records.

Could you please post an example of databinding with 2 levels? for example

Manager 1
    Employee 1
    Employee 2
Manager 2
    Employee 3
    Employee 4

Thank you very much, by the way, the gridview is working perfect with childwindows!!!!!!!!!
Thanks
0
Stefan Dobrev
Telerik team
answered on 17 Aug 2010, 09:52 AM
Hi all,

The functionality that you need will be available in RadGridView and not in RadTreeListView. We are going to alter the current grouping behavior of RadGridView. You will be able to see the group aggregates in the group header aligned to the grid's columns. Will that work for you?

@Chris Can you share more details about your scenario? Are those Managers and Employees deriving from the same entity? Do you need to display aggregates?

Regards,
Stefan Dobrev
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
0
Chris Thierry
Top achievements
Rank 1
answered on 17 Aug 2010, 02:50 PM
I prefer to use a RadTreeListView I have more columns than Employee1 to show and I believe that the layout is better with a RadTreeListView, I'm just trying to bring a list from a WCF service in this way:

parent            child            info
-------------------------------------------------
Manager1    Employee1    a
Manager1    Employee2    b
Manager1    Employee3    x
Manager2    Employee3    c
Manager2    Employee4    d
Manager2    Employee5    e

I need to show the information like this:

Manager1
    Employee1    a
    Employee2    b
    Employee3    x
Manager2
    Employee3    c
    Employee4    d
    Employee5    e

All the information is in one query, do I need to create a relation between the manager and the employee with two different classes?, Can I do the same as you say with RadGridView and grouping?
Thank you.
0
Stefan Dobrev
Telerik team
answered on 20 Aug 2010, 03:53 PM
Hello Chris,

Yes you should build the hierarchy on your own after you have retrieved the items via WCF. This is the case for RadTreeListView. If you don't want to do so you can also use the self reference hierarchy of the grid with a filter descriptor on the root that will filter only the managers.

Sincerely yours,
Stefan Dobrev
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
0
Chris Thierry
Top achievements
Rank 1
answered on 22 Sep 2010, 05:12 PM
Hi,
Will  the functionality of having columns in the grouping for RadGridView be available in the next release of November?  Will the  aggregate functions be in the columns as the example below?

If we had the following in the raggridview:

Department    Employee     salary   numberofHoursWorked
Department1  employee1   100       3
Department1  employee2   200       5
Department1  employee3   100       3
Department2  employee4   100       3

And grouped it by Department and had sum aggregate on salary and numberofHoursWorked, will we see the following?
Department    Employee     salary   numberofHoursWorked
Department1                      400       11
                      employee1   100       3
                      employee2   200       5
                      employee3   100       3
Department2                      100       3
                      employee4   100       3


instead of having the following like in Q2
Department1  totalSalary:400  totalHours:11
                      employee1   100       3
                      employee2   200       5
                      employee3   100       3
Department2    totalSalary:100  totalHours:3
                      employee4   100       3

Thanks





0
Stefan Dobrev
Telerik team
answered on 27 Sep 2010, 07:39 AM
Hi Chris,

Our feature schedule is already filled for Q3 2010. This means that the grouping in RadTreeListView will not be available in this time frame.

Regarding the column aligning of aggregates we have already thought out a way this can be implemented, but still not manage to dedicate a time to finish it. Once it is available for RadGridView it will be available in RadTreeListView as well.

Kind regards,
Stefan Dobrev
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
0
Max Cappellari
Top achievements
Rank 1
answered on 11 Nov 2010, 07:15 PM

Stefan,

Is the "column aligning of aggregates we have already thought out a way this can be implemented" mentioned for the RADGridView available in any of the newer releases. We have an enterprise application that needs this ASAP.


Thank you,
Max Cappellari
0
Hristo
Telerik team
answered on 12 Nov 2010, 05:03 PM
Hello Max Cappellari,

The column aligning of aggregates is in our ToDo list for Q1 2011 release which is expected in March next year. In the meanwhile you can try the workaround proposed in this forum thread.

Greetings,
Hristo
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
TreeListView
Asked by
Unni Kumar
Top achievements
Rank 1
Answers by
Unni Kumar
Top achievements
Rank 1
Chris Thierry
Top achievements
Rank 1
Stefan Dobrev
Telerik team
Max Cappellari
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or