[CLOSED] Disable , hide , and show a tree node from the server side

  1. #1

    [CLOSED] Disable , hide , and show a tree node from the server side

    I'm trying to disable , hide , and show after hiding a tree node from the server side, but I can't find any method to do this.

    on a previous editions there were methods for deleting , disabling , showing ;

    DisableNode

    HideNode

    ShowNode


    Is there any way to do it with a specific tree node?
    Last edited by Daniil; Feb 25, 2014 at 3:44 AM. Reason: [CLOSED]
  2. #2
    Hi @elbanna23,

    Yes, unfortunately, this functionality is gone.

    As for showing/hiding a node, I added the following breaking change item. Please follow the link.
    186. The TreePanel's ShowNode and HideNode methods have been removed. The TreeNode's Hidden property has been removed as well.
    Please see how to achieve it now: http://forums.ext.net/showthread.php...ll=1#post84070

    As for disabling a node, I added the following breaking change item.
    187. The TreePanel's DisableNode method has been removed. The TreeNode's Disabled property has been removed as well.
    Please see how to achieve it now: http://forums.ext.net/showthread.php?28092
    And here is an example.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    
        <script>
            Ext.tree.View.override({
                processItemEvent: function(record, row, rowIndex, e) {
                    if (record.data.disabled) {
                        return false;
                    }
    
                    this.callParent(arguments);
                }
            });
    
            var getRowClass = function (record, rowIndex) {
                if (record.data.disabled) {
                    return "x-item-disabled";
                }
            };
        </script>
    
        <style>
            .x-item-disabled {
                opacity: 0.5;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:TreePanel ID="TreePanel1" runat="server">
                <Fields>
                    <ext:ModelField Name="disabled" />
                </Fields>
                <Root>
                    <ext:Node Text="Root (level 0)" Expanded="true">
                        <CustomAttributes>
                            <ext:ConfigItem Name="disabled" Value="true" Mode="Raw" />
                        </CustomAttributes>
                        <Children>
                            <ext:Node Text="Node1 (level 1)" Expanded="true">
                                <Children>
                                    <ext:Node Text="Node1 (level 2)" Expanded="true">
                                        <Children>
                                            <ext:Node Text="Node1 (level 3)" Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="disabled" Value="true" Mode="Raw" />
                                                </CustomAttributes>
                                            </ext:Node>
                                            <ext:Node Text="Node2 (level 3)" Leaf="true" />
                                        </Children>
                                    </ext:Node>
                                </Children>
                            </ext:Node>
                            <ext:Node Text="Node2 (level 1)" Expanded="true">
                                <Children>
                                    <ext:Node Text="Node1 (level 2)" Expanded="true">
                                        <Children>
                                            <ext:Node Text="Node1 (level 3)" Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="disabled" Value="true" Mode="Raw" />
                                                </CustomAttributes>
                                            </ext:Node>
                                            <ext:Node Text="Node2 (level 3)" Leaf="true" />
                                        </Children>
                                    </ext:Node>
                                </Children>
                            </ext:Node>
                        </Children>
                    </ext:Node>
                </Root>
                <View>
                    <ext:TreeView runat="server">
                        <GetRowClass Fn="getRowClass" />
                    </ext:TreeView>
                </View>
            </ext:TreePanel>
        </form>
    </body>
    </html>
  3. #3
    Dear Sir
    please if you can , try to return the methods for deleting , disabling , showing that were in the previous editions.

    cause it was very simple.

    thank you in advance
  4. #4
    I agree with you, it would be nice to have it back. Though, I am not sure they'll be back at this point.

Similar Threads

  1. Replies: 3
    Last Post: Feb 17, 2014, 11:29 AM
  2. [CLOSED] Hide Tree Panel Node in Razor
    By Patrick_G in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 15, 2013, 11:14 PM
  3. [CLOSED] Adding/removing (hide/show) tools in panel server side
    By mrozik in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 18, 2013, 2:23 PM
  4. Replies: 1
    Last Post: Apr 02, 2013, 5:50 AM
  5. [CLOSED] Show-Hide BorderLayoutRegion server side
    By methode in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 21, 2009, 9:42 AM

Tags for this Thread

Posting Permissions