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

Using LoadOnDemand(PageMethods) and Attributes.Add(onclick)

1 Answer 39 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ajith Nair
Top achievements
Rank 1
Ajith Nair asked on 18 Jun 2010, 07:28 AM
Hi,
I want to create a RadTreeView using PageMethods just like in the demo "http://demos.telerik.com/aspnet-ajax/treeview/examples/programming/loadondemandmodes/defaultcs.aspx" . But in my case the Childs are from different tables in the database. I have 2 levels of child. I want to add 2 different onclick attributes to the 2 child levels. ie childnodeAtLevel1.Attributes.Add("onclick", "level1Method(some argument))" And childnodeAtLevel2.Attributes.Add("onclick", "level2Method(some argument))".Also when I delete the Root node data from somewhere say a radgrid, then the RadTree also should get refreshed. Is there any ways to accomplish this?
Thanks in advance.
Ajith U Nair



1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 18 Jun 2010, 12:22 PM
Hello Ajith Nair,

Instead separating the population of the different level nodes in many methods, you can simply check their level and use switch(level) to use the proper implementation in the same method!

Hope this is going to help you!


Regards,
Nikolay Tsenkov
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
TreeView
Asked by
Ajith Nair
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or