TreeList - Define Id of root level items?

3 posts, 1 answers
  1. Jason
    Jason avatar
    9 posts
    Member since:
    Aug 2017

    Posted 31 Aug 2017 Link to this post

    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. Answer
    Eyup
    Admin
    Eyup avatar
    3448 posts

    Posted 05 Sep 2017 Link to this post

    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.
  3. Jason
    Jason avatar
    9 posts
    Member since:
    Aug 2017

    Posted 05 Sep 2017 in reply to Eyup Link to this post

    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

Back to Top