Hello,
I have created a usercontrol where I show an overview of rows from an entity. So far all this entities had a hierarchie (parentid). Now I have an entity (table) without a hierarchie. In other words, the treelist only have to show one level. Because I want to reuse this usercontrol I like to know if it is possible. I had removed the property ParentDataKeyNames but that the Exception:
Is it possible what I want?
Kind regards,
Patrick
I have created a usercontrol where I show an overview of rows from an entity. So far all this entities had a hierarchie (parentid). Now I have an entity (table) without a hierarchie. In other words, the treelist only have to show one level. Because I want to reuse this usercontrol I like to know if it is possible. I had removed the property ParentDataKeyNames but that the Exception:
KeyNames collection length must match ParentKeyNames collection length.
Is it possible what I want?
Kind regards,
Patrick
7 Answers, 1 is accepted
0
Accepted
Hello Patrick,
In order to have all items as roots items in the RadTreeList, their parent data key value should be NULL or the default value for the type.
To overcome this, you can use the approach from the project attached to this message.
However, I recommend the usage of RadGrid in this scenario.
Best wishes,
Mira
the Telerik team
In order to have all items as roots items in the RadTreeList, their parent data key value should be NULL or the default value for the type.
To overcome this, you can use the approach from the project attached to this message.
However, I recommend the usage of RadGrid in this scenario.
Best wishes,
Mira
the Telerik team
0
Patrick
Top achievements
Rank 1
answered on 17 Mar 2011, 05:26 PM
Thx, that did the job!
0
Chris @ Intrinsic
Top achievements
Rank 1
answered on 28 Mar 2011, 07:41 PM
One question i hve for treelist: Can I have multiple tables implemented in the treelist? for example Users --> Addresses (where users have multiple addresses), so it is a standard one to many relationship, and the tables are not self referencing. I want to be able to use the treelist because it is the most visually 'correct' way that the customer wants to view and edit the data.
Thanks.
Thanks.
0
Hi Chris,
RadTreeList supports only self-referencing tables/structures. If you need to use several source tables to represent hierarchy, consider using our AJAX web grid for this purpose. Review the demos under the 'Hierarchy' node here for more details:
http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx
Best regards,
Sebastian
the Telerik team
RadTreeList supports only self-referencing tables/structures. If you need to use several source tables to represent hierarchy, consider using our AJAX web grid for this purpose. Review the demos under the 'Hierarchy' node here for more details:
http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx
Best regards,
Sebastian
the Telerik team
0
Chris @ Intrinsic
Top achievements
Rank 1
answered on 29 Mar 2011, 06:07 PM
Ok. Thanks very much. What about your listview control? What advantage does listview have over gridview in this situation?
0
Chris @ Intrinsic
Top achievements
Rank 1
answered on 29 Mar 2011, 06:13 PM
Ok. Thanks very much. What about your listview control? What advantage does listview have over gridview in this situation?
Also for gridview, is it possible to have the lines on it to make it look like the treelist does?
Thank you again.
Also for gridview, is it possible to have the lines on it to make it look like the treelist does?
Thank you again.
0
Hello Chris,
Our AJAX ListView control is used to display flat data structures using a set of predefined or custom layouts. To align the columns in each level of a RadGrid hierarchy, utilize the solution depicted here.
Best regards,
Sebastian
the Telerik team
Our AJAX ListView control is used to display flat data structures using a set of predefined or custom layouts. To align the columns in each level of a RadGrid hierarchy, utilize the solution depicted here.
Best regards,
Sebastian
the Telerik team