[CLOSED] TreePanel/TreeGrid with a Store ?

  1. #1

    [CLOSED] TreePanel/TreeGrid with a Store ?

    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,
    Last edited by Daniil; May 05, 2014 at 12:35 PM. Reason: [CLOSED]
  2. #2
    Hi @UnifyEducation,

    Yes, it is possible. Please see examples inside the TreePanel/Loaders folder.
    https://examples2.ext.net/
  3. #3
    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,
  4. #4
    Yes, it is still a TreePanel, so, it is possible. Does something not work for you?
  5. #5
    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:

    Click image for larger version. 

Name:	tree.png 
Views:	36 
Size:	4.2 KB 
ID:	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().AjaxProxy().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")));
         )}
  6. #6
    I cannot see where you defined a Model for the TreeStore. You should define a Model with respective ModelFields.
  7. #7
    Quote Originally Posted by Daniil View Post
    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,
  8. #8
  9. #9
    Quote Originally Posted by Daniil View Post
    Thank you Daniil, it works now.

Similar Threads

  1. [CLOSED] Accept Changes Treepanel store
    By RCM in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 30, 2013, 10:11 PM
  2. Replies: 0
    Last Post: Mar 17, 2011, 11:05 AM
  3. [CLOSED] Get selected node from a TreeGrid or TreePanel from code behind
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Jun 23, 2010, 9:19 AM
  4. [CLOSED] TreeGrid: Header width when treegrid is flexible
    By wazige in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: May 06, 2010, 10:44 AM
  5. Replies: 0
    Last Post: Apr 24, 2010, 11:52 AM

Posting Permissions