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

RadTreeView does not sort according parent id but alphabetically

1 Answer 102 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 07 Aug 2020, 04:43 AM

Hi,

     I have a radtreeview which will order the hierarchy level by level. Here is the code

uiAvailableLocations.DataValueField = FujiXerox.Common.Systems.Sustainability.Constants.Location.ID;
uiAvailableLocations.DataTextField = FujiXerox.Common.Systems.Sustainability.Constants.Location.LocationName;
uiAvailableLocations.DataFieldID = FujiXerox.Common.Systems.Sustainability.Constants.Location.ID;
uiAvailableLocations.DataFieldParentID = FujiXerox.Common.Systems.Sustainability.Constants.Location.ParentID;
uiAvailableLocations.DataSource = ds;
uiAvailableLocations.DataBind();

 

The dataset ds will return the data in alphabetically order. At most times, the treeview can be sort in parent child order normally. But for some strange moments, it will just render the result alphabetically but not in parent child order. The code is same, however sometimes it just render the data alphabetically. What is the reason and how can I fix it?

 

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 11 Aug 2020, 07:33 AM

Hello Alex,

We have never received such reports or replicated this issue on our side, so we cannot tell you what causes it and how to fix it. 

Usually, all nodes are represented as root nodes when their parentID is null.

If the tree is not rendered correctly client-side, ensure there are no JavaScript errors in the browser's console.

Regards,
Peter Milchev
Progress Telerik

Tags
TreeView
Asked by
Alex
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or