Problems with sorting and grouping in NTreeList control


Author
Message
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

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
Jérôme Marchaud
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
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.


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search