[CLOSED] How to remove an icon from a TreeNode in TreeGrid?

  1. #1

    [CLOSED] How to remove an icon from a TreeNode in TreeGrid?

    Hi,

    I need to be able to present a TreeGrid node with no icon. It seems like the default icon is set to be Folder and I can't get rid of it in the markup or the server code:

    myParentNode.Nodes.Add(new Ext.Net.TreeNode { NodeID = "MyChildNode1", Icon = Icon.None, Expanded = true });
    Please suggest a workaround.
    Last edited by Daniil; Jun 26, 2015 at 7:11 PM. Reason: [CLOSED]
  2. #2
    Hi Vadym,

    We had such a request to get it working as you need, but, unfortunately, didn't have a chance to implement this.
    http://forums.ext.net/showthread.php?11860

    There is a possible solution for a TreePanel in the thread. It might require adjustment for TreeGrid, but it looks the core idea should be the same.
  3. #3
    Thanks, Daniil! The link was helpful and I got it to work. The solution snippet is below. Please feel free to close this thread down.

    <style>
                .my-node .x-tree-node-icon {
                    display: none !important;
                }
    </style>
    myParentNode.Nodes.Add(new Ext.Net.TreeNode { NodeID = "MyChildNode1", Cls="my-node", Expanded = true });

Similar Threads

  1. Replies: 7
    Last Post: Mar 05, 2014, 9:42 AM
  2. changing Icon of a TreeNode
    By _xpto in forum 1.x Help
    Replies: 1
    Last Post: Oct 26, 2012, 3:10 PM
  3. using javascript add a new treenode to a treegrid
    By huchaonian in forum 1.x Help
    Replies: 3
    Last Post: Oct 14, 2010, 9:32 AM
  4. Replies: 0
    Last Post: Dec 10, 2009, 11:14 AM
  5. Treenode Icon
    By DasPhansom in forum 1.x Help
    Replies: 1
    Last Post: Jan 28, 2009, 11:57 AM

Tags for this Thread

Posting Permissions