Profile Picture

Problems with sorting and grouping in NTreeList control

Posted By Jérôme Marchaud 14 Years Ago
Author
Message
Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Jérôme,

To sort and group by the nodes after the nodes recreation you can do the following:

nTreeList1.ClearAllNodes();
PopulateTreeList();
//Populates the tree list again.


for (int i = 0; i < nTreeList1.Columns.Count; i++)
{
    NTreeListColumn column = nTreeList1.Columns[i];
    if (column.SortMode != TreeListSortMode.None)
    {
        nTreeList1.SortColumn(column, column.SortMode);
    }
    if (column.IsGroupedBy)
    {
        nTreeList1.Ungroup(column);
        nTreeList1.GroupBy(column);
    }
}

 

 



Best Regards,
Nevron Support Team



Jérôme Marchaud
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 3, Visits: 1

We have a question regarding the NTreeList control. When the "Sorting" or "Grouping" feature is used, modifying the content of the list leads to inconsistent results.

 

If we call ClearAllNodes, and populate again the list, the column that was sorted is still marked with the up/down arrow in the header and the different color, but the content is not sorted.

 

If a column was defined as a grouping column, it disappears.

 

Is there a way to have the nodes still sorted/grouped according to the current sorting/grouping column?

 

Thank you in advance.

Best regards.





Similar Topics


Reading This Topic