Creating grouping in treelistview

10 posts, 0 answers
  1. Unni Kumar
    Unni Kumar avatar
    2 posts
    Member since:
    Oct 2009

    Posted 22 Jul 2010 Link to this post

    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.
  2. Unni Kumar
    Unni Kumar avatar
    2 posts
    Member since:
    Oct 2009

    Posted 22 Jul 2010 Link to this post

    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.
  3. DevCraft banner
  4. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 16 Aug 2010 Link to this post

    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
  5. Stefan Dobrev
    Admin
    Stefan Dobrev avatar
    790 posts

    Posted 17 Aug 2010 Link to this post

    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
  6. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 17 Aug 2010 Link to this post

    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.
  7. Stefan Dobrev
    Admin
    Stefan Dobrev avatar
    790 posts

    Posted 20 Aug 2010 Link to this post

    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
  8. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 22 Sep 2010 Link to this post

    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





  9. Stefan Dobrev
    Admin
    Stefan Dobrev avatar
    790 posts

    Posted 27 Sep 2010 Link to this post

    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
  10. Max Cappellari
    Max Cappellari avatar
    1 posts
    Member since:
    Mar 2006

    Posted 11 Nov 2010 Link to this post


    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
  11. Hristo
    Admin
    Hristo avatar
    408 posts

    Posted 12 Nov 2010 Link to this post

    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
Back to Top
DevCraft banner