Hello,
We need to simulate node click event on client side. We tried to use client side select() method, but this method does not cause postback, like expand() method for example.
Is there client side method that equivalent to user click action? Or may be there is a workaround for the problem?
Regards,
Olga
We need to simulate node click event on client side. We tried to use client side select() method, but this method does not cause postback, like expand() method for example.
Is there client side method that equivalent to user click action? Or may be there is a workaround for the problem?
Regards,
Olga
5 Answers, 1 is accepted
0
Hi Mushon Nachmias,
Please try using the select function instead, as it will do a postback as required.
Here you can read more about it.
Best wishes,
Simon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Please try using the select function instead, as it will do a postback as required.
Here you can read more about it.
Best wishes,
Simon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Mark
Top achievements
Rank 1
answered on 19 May 2008, 01:58 PM
Hi Simon,
Instead of what?
select() method does not cause postback, as I wrote in my first post.
Thanks
Instead of what?
select() method does not cause postback, as I wrote in my first post.
Thanks
0
Mark
Top achievements
Rank 1
answered on 19 May 2008, 02:20 PM
Hi Simon,
I have found the following in Telerik's documentation:
I have found the following in Telerik's documentation:
Selects or unselects a Node based on the boolean parameter.
If selecting a Node with a mouse does postback, calling the set_selected(true) function will select the Node but will NOT do postback.
Regards,
Olga
0
Hello Mushon Nachmias,
The select() function selects a Node but a postback will occur only if you had handled the OnNodeClick server-side event of the RadTreeView; otherwise a postback will not occur although the Node will get selected on the client.
I hope this helps.
All the best,
Simon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The select() function selects a Node but a postback will occur only if you had handled the OnNodeClick server-side event of the RadTreeView; otherwise a postback will not occur although the Node will get selected on the client.
I hope this helps.
All the best,
Simon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Eric
Top achievements
Rank 2
answered on 07 Jul 2011, 03:06 AM
A quick addendum to the replies posted here.
I had a need to trigger the client side "click" event of a tree node programmatically in response to a user initiated click of a context menu item. To accomplish this using the client API you can do something like the following:
Simple, but effective. I have only tested this in IE9, but I believe it should work in most browsers. Hope this helps someone else.
I had a need to trigger the client side "click" event of a tree node programmatically in response to a user initiated click of a context menu item. To accomplish this using the client API you can do something like the following:
function ContextMenu_onClientMenuItemClicking(sender, e){
e.get_node().get_textElement().click();
}
Simple, but effective. I have only tested this in IE9, but I believe it should work in most browsers. Hope this helps someone else.