|
Rank: Member Groups: Member
Joined: 4/4/2013 Posts: 10
|
Hi,
I have a Treeview, and have a context menu on it which is working. I need to now get the event working when the user clicks on the menu item. For that I have a OnClickScript ="MenuItemClickHandler" in the menuitem. Which is not firing. The context menu has new node, edit and delete options. So any help in the lines of menu item click, getting a handle on the treeview node, any tricks would be greatly appreciated,
thanks, Bhartha
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
OnClickScript does not take a function name. It takes full JavaScript code such as "alert('clicked')". ClientSideOnClick takes function name.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 4/4/2013 Posts: 10
|
Hi,
<eo:MenuItem Text-Html="Rule" ClientSideOnClick ="MenuItemClickHandler"></eo:MenuItem>
I get an error. So, what I tried was, have a event fire from the ContextMenu, <eo:ContextMenu ID="ContextMenu1" runat="server" ControlSkinID="None" SubMenuIconUrl="Blank" Width="120px" RaisesServerEvent="True" OnItemClick ="trvMenuItems_OnItemClick">
If the above (contextmenu event firing) is the direction I take, How can I get a handle on the node on the treeview.
Store the node from the ShowContextMenu(e, treeview, node)? Like an hiddenfield, example: <asp:HiddenField ID ="nodeID" runat ="server" />?
I do not mind the server side, but now, need to manipulate the treenode on which the context menu was shown. So, I my questions
1: How do I get a handle on the node on which the context menu was shown? (see above my doubts) 2: How can I read the position of the node in the tree? 3: How can I add the tree at a particular spot in the tree?
Thank you for the quick reply, if you can answer me the above 3 questions, that would be awesome. Thanks, Bhartha
|
|
Rank: Member Groups: Member
Joined: 4/4/2013 Posts: 10
|
Can someone please help?
Thanks, Bharath
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
|
|
Rank: Member Groups: Member
Joined: 4/4/2013 Posts: 10
|
Thanks, that worked!
You are been very quick to answer to my questions, and have been great. Thanks once again.
Bharath
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Glad to hear that! Please feel free to let us know if there is anything else.
|
|
Rank: Member Groups: Member
Joined: 4/4/2013 Posts: 10
|
Everything working fine so far. No issues on this subject. have a Dialog box pop up yesterday with the required fields. Now, I have added a few buttons to this dialog, and presently wiring some button click events on the server side. No problems so far. Thanks a plenty. Awesome Job you guys.
|
|