Is there a way I can pop out a customized menu on right click with the webdatatree?
Works perfectly. Thanks Dave!
Hey,
Unfortunately there is no clear selection method on the client. But the code to clear all selected nodes is quite simple.
var tree = $find("WebDataTree1"); for (var x = tree.get_selectedNodes().length - 1; x >= 0; --x) { tree.get_selectedNodes()[x].set_selected(false); }
Just be sure to clear the selection before you select your new node. Otherwise you'll have nothing selected.
-Dave
Hi David,
I am able to select the node that was clicked on as you posted, the problem is that if another node was selected, even though I have the tree set to Single selection, both nodes show as selected.
Is there a property on the client-side that I can pull the currently selected nodes to perform .set_selected(false) or better yet, a method like tree.selectednodes.clear() ?
Thank you in advance.
Hi Tom,
Thank you for your response. I have seen what you are describing in other sections so it is refreshing to know you guys are still working to include additional examples where they are lacking. Awesome product just wanted to ensure I was leveraging it to it's fullest potential! :)
Hi,
My name is Tom Puglisi and I work with the Product Guidance division of Infragistics. We currently have a plan to make major improvements in Docs and Samples. One of these improvements is to provide more information and code examples for the client-side object model for our ASP.NET controls.
We have made improvements to provide client-side documentation through our API docs. Here is how you can get to this information:
In the API Guide section of our ASP.NET documentation, locate the namespace / classes that you are interested in. In this case, we will check out some of the WebDataGrid behavior classes as they have client-side events that we can handle.
In this example, I located the Selection WebDataGrid behavior class (called Selection). This class has several server-side properties that actually represent the client-side functions that listen to the client-side events. Click on and expand this class' Properties node.
Click through each property to see some example code on how to handle the client-side event. You should be able to go through many of the most frequently used client-side members and get example code on how to use the event as well as all of the event arguments.
Hope this helps!
-Tom