[CLOSED] Treegrid last line no expand icon

  1. #1

    [CLOSED] Treegrid last line no expand icon

    Hi

    I create a treegrid and populate it with 2 lines that can expand.
    However the last line shows no expand icon.
    Note:
    When I double click the last line it does expand though.
    If I add 3 lines, lines 1-2 can expand and line 3 not.

    Example image:
    Click image for larger version. 

Name:	Capture.JPG 
Views:	74 
Size:	24.6 KB 
ID:	25105

    Double click image:
    Click image for larger version. 

Name:	Capture1.JPG 
Views:	76 
Size:	19.2 KB 
ID:	25106

    Example Code:
      <ext:Viewport runat="server" Layout="BorderLayout" ID="viewport">
        <Items>
          <ext:TreePanel ID="TreePanel1" runat="server" RootVisible="false" AutoScroll="true" Region="Center">
            <Fields>
              <ext:ModelField Name="Column1" />
            </Fields>
            <ColumnModel>
              <Columns>
                <ext:TreeColumn runat="server" Text="a" Width="300" Sortable="true" DataIndex="Column1" />
              </Columns>
            </ColumnModel>
          </ext:TreePanel>
        </Items>
      </ext:Viewport>

    
    protected void Page_Load(object sender, EventArgs e)
        {
          if (!X.IsAjaxRequest)
          {
            NodeProxy rootNode = TreePanel1.GetRootNode();
            rootNode.RemoveAll();
    
            Node node = new Node()
            {
              NodeID = "1",
              Leaf = false,
              Icon = Icon.Table
            };
    
            node.CustomAttributes.Add(new ConfigItem("Column1", "top 1", ParameterMode.Value));
            for (int i = 0; i < 2; i++)
            {
              Node stop = new Node()
              {
                NodeID = "sub1" + i,
                Leaf = false,
                Icon = Icon.CarStop
              };
    
              stop.CustomAttributes.Add(new ConfigItem("Column1", "sub " + i, ParameterMode.Value));
              node.Children.Add(stop);
            }
    
            rootNode.AppendChild(node);
    
            node = new Node()
            {
              NodeID = "2",
              Leaf = false,
              Icon = Icon.Table
            };
    
            node.CustomAttributes.Add(new ConfigItem("Column1", "top 2", ParameterMode.Value));
            for (int i = 0; i < 2; i++)
            {
              Node stop = new Node()
              {
                NodeID = "sub2" + i,
                Leaf = false,
                Icon = Icon.CarStop
              };
    
              stop.CustomAttributes.Add(new ConfigItem("Column1", "sub " + i, ParameterMode.Value));
              node.Children.Add(stop);
            }
    
            rootNode.AppendChild(node);
          }
        }
    Last edited by fabricio.murta; Feb 23, 2018 at 4:55 PM.
  2. #2
    Upgrading from 4.1 to 4.5 seems to have fixed the issue.
  3. #3
    Hello @Ampathdev!

    Thanks for the feedback! I don't remember complaints about this issue from earlier 4.x versions of Ext.NET, but glad it was really resolved in-between. In fact, a very big amount of issues were fixes since that release!..

    Anyway, glad you could sort out the issue.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 1
    Last Post: Mar 13, 2012, 8:37 AM
  2. [CLOSED] Hiding the Expand / Collapse Icon in a GroupTabPanel
    By garrisrd in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 06, 2012, 6:48 AM
  3. Hide Rowexpander expand icon
    By bjones in forum 1.x Help
    Replies: 2
    Last Post: Jan 19, 2012, 12:17 PM
  4. Replies: 3
    Last Post: Aug 11, 2011, 11:07 AM
  5. Change the expand column of TreeGrid
    By Thiago Nogueira in forum 1.x Help
    Replies: 0
    Last Post: Nov 17, 2010, 5:37 PM

Tags for this Thread

Posting Permissions