DataFieldParentID

3 posts, 0 answers
  1. Regeesh Joseph
    Regeesh Joseph avatar
    55 posts
    Member since:
    May 2010

    Posted 31 Jul 2010 Link to this post

    Hai,

    I have a dataset having fields in the following way :

    Flight_Id    Flight_Name   Sector_Id      Sector_Name
    ----------------------------------------------------------------------------
    1                    A                        100                a
    2                    B                        200                b
    3                    C                        300                c

    I want a treeview with Flight_Name as parent nodes and corresponding sector_Name as its child nodes.

    Can anybody give some sample code to bind the treeview like this?

    Thanks & regards,
    Regeesh Joseph
  2. Regeesh Joseph
    Regeesh Joseph avatar
    55 posts
    Member since:
    May 2010

    Posted 02 Aug 2010 Link to this post

    What is the use of DataFieldParentID in the case of child node binding?
  3. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 02 Aug 2010 Link to this post

    Hi Regeesh Joseph,

    Well, you probably will have to change the relation a bit (if this is not possible than you can extract the needed view of the data with some more complex query).
    Since you can only bind the treeView to a single data source, you can not divide the two types of nodes in different data sources.

    But you can always bind the treeView with custom method running on the server, extracting data from the data source and dynamically creating nodes of it.

    Hope this is helpful for you!


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top