Problem adding Child Nodes in Lightswitch

2 posts, 0 answers
  1. Alex
    Alex avatar
    23 posts
    Member since:
    May 2005

    Posted 07 Jun 2011 Link to this post


    I'm having trouble adding elements to the TreeListView in Lightswitch if I want to add below the root.  I have a basic self referencing table : [ID, Code, Description, ParentID] served up by a WCF service.  I have managed to get the hierarchical data to display in a Lightswitch screen by wrapping the TreeListView in a Custom Control.  In order to get adding rows to work (hooking into TreeListView_AddingNewDataItem didn't work out), I had to roll a custom modal dialog that prior to showing, sets the Parent property of the new object equal to the object bound at the row selected by the user in the TreeListView, as well as adds the new object to the Children collection of the parent.  My problem is that the node always shows up at the root level.  I can't get it to appear as a child of the selected item.  When creating the new object, I use the AddNew() method of the Parent objects Children property (i.e. parent.CategoryChildren.AddNew() ). 

    Are there any tips or suggestions on how to go about doing this in Lightswitch?  Any help would be appreciated. 

  2. Milan
    Milan avatar
    1989 posts

    Posted 13 Jun 2011 Link to this post

    Hi Alex Durrant,

    I am afraid that we cannot determine where the problem is with your current setup without receiving any additional information. 

    We have prepared a sample application which demonstrates data insertion. Simply select a parent row and press the button.

    Hope it helps. 

    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