PDA

View Full Version : [CLOSED] TreePanel with more than one TreeColumn



RCN
May 10, 2012, 8:08 PM
I wonder why the TreePanel just allow one TreeColumn column.

The following example renders correctly but it fails if i change the type of _cln2 to TreeColumn or if i change the type of _cln1 to Column



<ext:TreePanel ID="_tp" UseArrows="true" Title="Tree"
Height="500" Width="500" Border="false" runat="server">
<Store>
<ext:TreeStore ID="_ts" runat="server">
<Proxy>
<ext:AjaxProxy Url="/Example/LoadTree/">
<ActionMethods Read="POST" />
<Reader>
<ext:JsonReader Root="data">
</ext:JsonReader>
</Reader>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model ID="_mdl" runat="server">
<Fields>
<ext:ModelField Name="Name" />
<ext:ModelField Name="Lastname" />
</Fields>
</ext:Model>
</Model>
</ext:TreeStore>
</Store>
<Root>
<ext:Node NodeID="0" Text="Root" />
</Root>
<ColumnModel>
<Columns>
<ext:TreeColumn ID="_cln1" runat="server" Text="Name" Sortable="true"
DataIndex="Name" />
<ext:Column ID="_cln2" runat="server" Text="Lastname" Sortable="true"
DataIndex="Lastname" />
</Columns>
</ColumnModel>
</ext:TreePanel>

Daniil
May 10, 2012, 8:45 PM
Hi,

Well, TreeColumn is a main column and, really, must be single. It provides indentation and folder structure markup for a Tree taking into account depth and position within the tree hierarchy.

RCN
May 11, 2012, 11:34 AM
Thank you daniil. Please mark it as closed