Feb 05, 2018, 11:34 AM
[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:
Double click image:
Example Code:
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:
Double click image:
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.