|
Rank: Advanced Member Groups: Member
Joined: 5/30/2007 Posts: 30
|
I am attempting use the edit ability of your treeview. When i change the value and click out of the text box, the TreeView1_ItemRenamed doesnt seem to fire. Is this when the event should fire? I have attempted to debug to verify its not getting called. I am also manually setting each node's allowedit = true and the first node's edit ability = false in code behind. I also have this treeview in an callback panel with a trigger to Treeview1. Here is my treeview. Quote: <eo:CallbackPanel ID="CallbackPanel1" runat="server" Height="150px" Width="200px" Triggers="{ControlID:DropDownList1;Parameter:},{ControlID:TreeView1;Parameter:},{ControlID:ContextMenu1;Parameter:}" ClientSideAfterExecute="callback_after_execute_handler" LoadingHTML='<div style="padding-right:50px"><img src="../images/indicator_mozilla_blu.gif"/></div>' GroupName="CBList">
<eo:TreeView ID="TreeView1" runat="server" Height="450px" Width="250px" AutoSelectSource="ItemClick" ControlSkinID="None" ClientSideOnContextMenu="ShowContextMenu" AllowEdit="True"> <LookNodes> <eo:TreeNode DisabledStyle-CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;color:Gray;padding-bottom:1px;padding-left:1px;padding-right:1px;padding-top:1px;" ItemID="_Default" NormalStyle-CssText="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; COLOR: black; BORDER-TOP-STYLE: none; PADDING-TOP: 1px; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: transparent; BORDER-BOTTOM-STYLE: none" SelectedStyle-CssText="background-color:#316ac5;border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:White;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;"> </eo:TreeNode> </LookNodes> <TopGroup
Style-CssText="border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:black;cursor:hand;font-family:Tahoma;font-size:8pt;padding-bottom:2px;padding-left:2px;padding-right:2px;padding-top:2px;"> <Bindings> <eo:DataBinding DataField="Text" Property="Text" /> <eo:DataBinding DataField="HListID" Property="Value" /> </Bindings> </TopGroup> </eo:TreeView> </eo:CallbackPanel>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi Ben,
I do not see anything that triggers the server event. ItemRenamed is a "delayed" event just like the change event for a TextBox control. It only gets triggered when the page gets posted back to the server.
If you wish to handle the event on the client side, you can use the client side handler ClientSideOnNodeRename property.
Please let us know if that is the problem.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 5/30/2007 Posts: 30
|
Thanks. I will look into how to use ClientSideOnNodeRename effectively. Is it possible to set the node's textboxes to auto postback?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Not as of this moment. But I believe you can use a Callback to trigger a server together with ClientSideOnNodeRename. Make you do not call eo_Callback inside that event handler directly. Use window.setTimeout to delay the callback until the current flow is done.
|
|
Rank: Advanced Member Groups: Member
Joined: 5/30/2007 Posts: 30
|
I had a feeling id have to set up a Callback method. I guess the last question is will the delayed server event still fire when i use ClientSideOnNodeRename?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
It supposes to. Kick us if it doesn't!
|
|
Rank: Advanced Member Groups: Member
Joined: 5/30/2007 Posts: 30
|
Creating the callback method worked. Thanks
|
|