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

Problem adding Child Nodes in Lightswitch

1 Answer 55 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 07 Jun 2011, 09:15 PM
Hi,

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. 

Thanks.
Alex.

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 13 Jun 2011, 10:01 AM
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. 


Greetings,
Milan
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
Tags
TreeListView
Asked by
Alex
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or