[CLOSED] [1.0] TreeEditor disable single-click to edit

  1. #1

    [CLOSED] [1.0] TreeEditor disable single-click to edit

    I'm using a TreeEditor to allow users to edit nodes on a TreePanel.

    Is there a way to disable the default behaviour of single-clicking to edit the node's text? I instead want to programmatically edit a particular node in the Tree when a user clicks a Button, the code for which works fine:

    TreeEditor:
    <ext:TreeEditor runat="server" ID="trdEditor">
       <Field>
          <ext:TextField runat="server"></ext:TextField>
       </Field>
    </ext:TreeEditor>
    JS code to dynamically edit a node:
    trdEditor.editNode = opNode;
    trdEditor.startEdit(opNode.ui.textNode, opNode.text);
    Thanks
  2. #2

    RE: [CLOSED] [1.0] TreeEditor disable single-click to edit

    Hi,

    Try to set for the TreeEditor
    ActivateEvent="none"
  3. #3

    RE: [CLOSED] [1.0] TreeEditor disable single-click to edit

    Hi,

    Sorry, TreeEditor doesn't support ActivateEvent property. I have added AutoEdit property for TreeEditor. Please update from SVN and set false for that property
  4. #4

    RE: [CLOSED] [1.0] TreeEditor disable single-click to edit

    Thanks for the reply Vladimir, however that doesn't seem to work. I am still able to edit the node when single-clicking on it. Please see below for a cut-down sample of the page I'm working on:

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">  
        <script type="text/javascript">
            function editTreeNode()
            {
                var opNode = tvwData.getNodeById("1");
            
                trdEditor.editNode = opNode;
                trdEditor.startEdit(opNode.ui.textNode, opNode.text);
            }
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server"></ext:ResourceManager> 
            
            <ext:ColumnTree ID="tvwData" 
                runat="server"
                Width="550"
                Height="300"
                RootVisible="false"
                AutoScroll="true"
                Title="Example Tasks">
                
                <BottomBar>
                    <ext:Toolbar runat="server">
                        <Items>
                            <ext:Button runat="server" Text="Edit node">
                                <Listeners>
                                    <Click Fn="editTreeNode" />
                                </Listeners>
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </BottomBar>
                
                <Columns>
                    <ext:ColumnTreeColumn Header="Tasks" Width="330" DataIndex="Task" />
                    <ext:ColumnTreeColumn Header="Duration" Width="100" DataIndex="Duration" />
                    <ext:ColumnTreeColumn Header="Assigned To" Width="100" DataIndex="User" />
                </Columns>
                
                <Loader>
                    <ext:TreeLoader>
                        <UIProviders>
                            <ext:TreeNodeUIProvider Alias="col" ClassName="<%# ColumnTree.ColumnNodeUI %>" AutoDataBind="true" />
                        </UIProviders>
                    </ext:TreeLoader>
                </Loader>
                
                <Root>
                    <ext:TreeNode Text="Tasks">
                        <Nodes>
                            <ext:TreeNode UIProvider="col" Icon="FolderGo" Text="ColumnTree Example" NodeID="1">
                                <CustomAttributes>
                                    <ext:ConfigItem Name="Task" Value="ColumnTree Example" Mode="Value" />
                                    <ext:ConfigItem Name="Duration" Value="3 hours" Mode="Value" />
                                    <ext:ConfigItem Name="User" Value="" Mode="Value" />
                                </CustomAttributes>
                            </ext:TreeNode>
                        </Nodes>
                    </ext:TreeNode>
                </Root>
                
                <Editors>
                    <ext:TreeEditor runat="server" ID="trdEditor" IgnoreNoChange="true" ActivateEvent="none">
                        <Field>
                            <ext:TextField ID="TextField1" runat="server"></ext:TextField>
                        </Field>
                    </ext:TreeEditor>
                </Editors>
            </ext:ColumnTree>
        </form>
    </body>
    </html>
    Thanks
  5. #5

    RE: [CLOSED] [1.0] TreeEditor disable single-click to edit

    Thanks Vladimir.

    Dan

Similar Threads

  1. GridPanel row edit opens in single click
    By pooja in forum 1.x Help
    Replies: 0
    Last Post: Aug 10, 2012, 6:09 AM
  2. [CLOSED] Disable/Enable edit control on gridpanel
    By bakardi in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 21, 2011, 3:59 PM
  3. Replies: 4
    Last Post: Aug 23, 2011, 3:03 PM
  4. edit the contents of a grid in single click
    By vs.mukesh in forum 1.x Help
    Replies: 3
    Last Post: Jun 02, 2011, 10:18 AM
  5. [CLOSED] ListView Single Click
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 05, 2011, 2:33 PM

Posting Permissions