View Full Version : [CLOSED] Setting the IDProperty when using a TreePanel

May 11, 2012, 12:35 PM
In the following example if i open the root node the method LoadTree is called passing the nodeID parameter, in other works, it runs as expected.

But if i set the IDProperty of the Model _mdl the nodeID parameter is passed as a blank string.

Any ideas to overcome this problem?

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

public StoreResult LoadTree(string nodeID)


May 11, 2012, 3:35 PM

You should set up IDProperty of the JsonReader. Does it help?

May 11, 2012, 6:45 PM
it works If i set JUST the IDProperty of JsonReader. But when i use GridPanel i just need to set the IDProperty of Model. I wonder the reason of differente between GridPanel and TreePanel.

May 11, 2012, 7:57 PM
Set IDProperty for Model should be enough
Do you return 'ID' field in your data?

For example, I see that Root node has no ID (it uses standard NodeID only)
Why do you want to change standard IDProperty? Id field has another name in your data?