Loading Tree from database

2 posts, 0 answers
  1. suryaprakash
    suryaprakash avatar
    1 posts
    Member since:
    Sep 2010

    Posted 23 Sep 2010 Link to this post

    Hi ,

    I am planning to purchase Telerik, if it supports following scenerio.

    I have data in  sql ,with 3 columns in a table

    (PK)column1 : navigationID
    Column2: ParentID
    Column3: Description

    Rows are as follows:

    Row1    1   1   Welcome
    Row2   2    1   home
    Row3    3   2   subhome1
    Row4    4   2  subhome2
    Row5    5   1    Contact us

    I need to display same  in Front end with context menu(Add nod,edit node, delete node) on each node. and when I add new node it should insert to above table with respect to there parent.

    I created one sqldatasource and added above table. and for tree control i reffered above 3 columns . for  DataFieldID = navigationID,DAtaFieldParentID=ParentID  and DataFieldTextField =Description but for some reasons I can not see any results in front end.

    * could you please give me example or sample code where I can follow similar scenerio

    Thanks and Regards,

  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 24 Sep 2010 Link to this post

    I believe the problem is with your first row "Welcome", where it's parent is itself. Set the ParentID for that row to null and then see if it works.

    I hope that helps.
Back to Top