Nov 12, 2012, 8:41 AM
[CLOSED] Treepanel Grid
Hej Guys.
I have a weird problem.
I am trying to make a Treepanel grid as shown in this exsample https://examples2.ext.net/#/TreePane...nced/TreeGrid/
When i follow the instruction on how initialize the Treegrid
Everthing goes well
But when it renders, it renders the tree on very column, meaning that my tree is rendered in very column with there respectiv data bound to that column.
for a more clear view on it, have a look at the picture i have uploaded.
My Tree grid does not use a tree store, only nodes initialized on creation
My code for the treegrid is as following..
I have a weird problem.
I am trying to make a Treepanel grid as shown in this exsample https://examples2.ext.net/#/TreePane...nced/TreeGrid/
When i follow the instruction on how initialize the Treegrid
Everthing goes well
But when it renders, it renders the tree on very column, meaning that my tree is rendered in very column with there respectiv data bound to that column.
for a more clear view on it, have a look at the picture i have uploaded.
My Tree grid does not use a tree store, only nodes initialized on creation
My code for the treegrid is as following..
LiaTree layoutSettings = new LiaTree("Settings", Ext.Net.Icon.Wrench, this);
layoutSettings.Fields.Add(new ModelField("Name", ModelFieldType.String));
layoutSettings.Fields.Add(new ModelField("Age", ModelFieldType.Int));
layoutSettings.Fields.Add(new ModelField("Sex", ModelFieldType.String));
TreeColumn colName = new TreeColumn(){DataIndex = "Name", Text="Name", Sortable = false, Hidden = false, Flex = 1};
TreeColumn colAge = new TreeColumn(){DataIndex = "Age", Text="Age", Sortable = false, Hidden = false, Flex = 1};
TreeColumn colSex = new TreeColumn(){DataIndex = "Sex", Text="Gender", Sortable = false, Hidden = false, Flex = 1};
layoutSettings.ColumnModel.Columns.Add(colName);
layoutSettings.ColumnModel.Columns.Add(colAge);
layoutSettings.ColumnModel.Columns.Add(colSex);
Node node = new Node();
node.Icon = Icon.User;
node.CustomAttributes.Add(new ConfigItem("Name", "Peter", ParameterMode.Value));
node.CustomAttributes.Add(new ConfigItem("Age", "30", ParameterMode.Value));
node.CustomAttributes.Add(new ConfigItem("Sex", "Male", ParameterMode.Value));
layoutSettings.RootNode.Children.Add(node);
AddToLayout(this, layoutSettings);
LiaTree inherit from TreePanel as shown here...
public class LiaTree : TreePanel
public Ext.Net.Node RootNode { get; set; }
public LiaTree(String Title, Icon icon, ILiaBase LiaBase)
{
_liaBase = LiaBase;
this.Title = _liaBase.Translate.GetText("Tree", Title, Title);
this.Icon = icon;
this.RootVisible = false;
this.BodyBorder = 0;
this.SimpleSelect = false;
this.MultiSelect = false;
this.Animate = false;
this.AnchorWidth = 200;
//tree.Tools.Add(new Tool(ToolType.Refresh,
// Ext.Net.X.Msg.Alert("Message", "Refresh Tool Clicked!").ToScript(), ""));
this.AutoScroll = true;
this.Listeners.CellDblClick.Handler = "LIA.addCenterTab (record);";
RootNode = new Ext.Net.Node();
RootNode.NodeID = "root";
RootNode.Expanded = true;
this.Root.Add(RootNode);
}
So my question is, how can i make it so that the columns only show the text value and not the icon and value of the node..
Last edited by Daniil; Nov 12, 2012 at 1:08 PM.
Reason: [CLOSED]