PDA

View Full Version : [CLOSED] TreePanel/TreeGrid with a Store ?



UnifyEducation
Mar 26, 2014, 2:15 PM
Hi,

Is it possible to bind a store with treepanel/treegrid in Ext.net 2.5?

if yes, Can you provide a link for an example please?

Thanks in advance,

Daniil
Mar 26, 2014, 8:45 PM
Hi @UnifyEducation,

Yes, it is possible. Please see examples inside the TreePanel/Loaders folder.
http://examples2.ext.net/

UnifyEducation
Mar 27, 2014, 8:41 AM
Hi Daniil,

I think i was not clear in my question. In fact, I want to bind a store to treegrid like the treegrid in the following example:

http://mvc.ext.net/#/TreePanel_Advanced/TreeGrid/

for this exmple, is it possible to bind a store?

Thanks,

Daniil
Mar 27, 2014, 4:38 PM
Yes, it is still a TreePanel, so, it is possible. Does something not work for you?

UnifyEducation
Mar 31, 2014, 9:13 AM
Hi Daniil,

In fact, When I am using store in TreeGrid, i can just display the structure of my tree but without any information in it, all columns are empty.
In google chrome's developer tool i can see data i want to show but in view there is nothing:

9081

I don't know what I am missing in my code. I am using a code like the code below in my treegrid:


Html.X().TreePanel().ForceFit(true).Border(false). Animate(true).ID(tree_id)
.Store(Html.X().TreeStore().Proxy(Html.X().AjaxPro xy().Url(Url.Action("GetNodes")))
.Parameters(p =>
{
p.Add(new StoreParameter("param1", param1));
p.Add(new StoreParameter("param2", param2));
})
.Root(Html.X().Node().NodeID("Root"))
)
.ColumnModel(c =>
{
c.Columns.Add(Html.X().TreeColumn().DataIndex("title"));
c.Columns.Add(Html.X().Column().DataIndex("information").Text("Information")));
)}

Daniil
Mar 31, 2014, 3:55 PM
I cannot see where you defined a Model for the TreeStore. You should define a Model with respective ModelFields.

UnifyEducation
Apr 29, 2014, 9:20 AM
I cannot see where you defined a Model for the TreeStore. You should define a Model with respective ModelFields.


Hi Daniil,

In fact, I left it for a few weeks to work with another things but when I get back to work with it, I did n't get it to work even with a model yet.
Is it possible to provide me a a link of working example or a few lines of code of GridTree with a store?

Thanks,

Daniil
Apr 29, 2014, 10:48 AM
Here you are.
http://mvc.ext.net/#/TreePanel_Loaders/Proxy/

UnifyEducation
May 05, 2014, 12:28 PM
Here you are.
http://mvc.ext.net/#/TreePanel_Loaders/Proxy/

Thank you Daniil, it works now.