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

TreeList - Define Id of root level items?

2 Answers 76 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 31 Aug 2017, 08:59 AM

I am using a TreeList with advanced binding with NeedDataSource event handling.

My data does not have any nodes with null / zero to define the root level nodes.

I have seen reference in other threads to settings a 'DefaultValue' to define root nodes but cannot see how to do this in documentation.

 

How do I display data when I do not have 0 / null root level Id's?

Eg. My root level node may be '1'. How do I configure the TreeList to recognize this?

 

Thanks

Jason

2 Answers, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 05 Sep 2017, 06:07 AM
Hi Jason,

You can check the explanation provided in the following post:
http://www.telerik.com/forums/no-records-to-display-959da9677068#5b--hX0EhkCIesI2PdyWNw

To summarize, the RadTreeList needs its parent items to have NULL values if the corresponding DataField is of a nullable type. If for example it is non-nullable long, then the expected value is 0:
http://www.telerik.com/forums/telerik-treelist-needdatasource-doesn-t-load-data#sycZkjXC_Eie4BZGAeHYag

I'm afraid this cannot be configured manually in the RadTreeList for ASP.NET AJAX.

I hope the clarification was helpful.

Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Jason
Top achievements
Rank 1
answered on 05 Sep 2017, 07:12 AM

Thanks for clarifying.

I understand the need for parent items to have NULL values.

My work around was to make a dummy 'root' level item with id of NULL as I cannot change the existing data.

Thanks

Jason

Tags
TreeList
Asked by
Jason
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Jason
Top achievements
Rank 1
Share this question
or