Each Item has an ID and a ParentID, and the hierachy of the data relies on that.
I can get most things to work, but however I cannot see the indentation when I click to expand something. I have attached an image to show what it looks like.
I'm not sure if this is due to the way the data source is binded. I'm actually dynamically binding the column (which are dynamically generated) to string indexers of a collection of dictionaries.
Maybe that broke the indentation of the Tree??
Or is there a setting somewhere that I can manually set to enable the indentations.
Any help would be great.
Thanks in advance.
6 Answers, 1 is accepted
Can you post more info how the treelist is bound? What is your child table definition?
Kind regards,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Thanks for the response, I just solved the problem.
Another quick question though, you wrote an article on dynamically creating a table, I can't find the link anymore, but I remember you have DataTable.cs , DataRow.cs, DataColumn.cs.. If I bind the tree to an instance of DataTable, do you think I can expand the DataRow class to have an instance of DataTable (suppose we call it ChildTable = new DataTable() ), and bind child table definition to that, do you think that will work??
Thanks
Indeed you can use my lightweight DataTable to bind hierarchical structure to the treelist since the table is not much different compared to the static scenario - will just create class with properties dynamically.
Best wishes,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
One last quick question, is it possible to have the hierarchy expanded upon loading?? You know how I click on the Parent and we see the child??
Is there a property in the TreeListView that allows the Tree to be expanded when loaded? As in we see all the children right away?
Thanks
You can use ExpandAllHierarchyItems() method to achieve your goal. Please check our "First Look" demo for more info. With our upcoming service pack (this week) you can use the new treelist property AutoExpandItems.
Kind regards,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Edit: My mistake, this method should be called after TreeList has loaded. I called this method in the RadTreeListView loaded event, and everything works
Thanks so much for all your help.
Would be better if there were more detailed documentation for methods and properties of some radcontrols. Thanks!