Ext GridPanel Problem

  1. #1

    Ext GridPanel Problem

    I am adding a dynamic grid to a view port on click of a button the data in the store is from an ajax proxy , I am using the same code as in https://examples2.ext.net/#/GridPane...s/HttpHandler/ but the difference is I am adding it in behind code .

    First problem is all the icon are not showing it is saying that it is cannot be found. Second problem is that I am getting the headers and the buttons and they are functioning properly but there is no data displayed in the grid ...

    Please help I have tried every thing I know here .
  2. #2
    Please post a complete (but simplified) code sample demonstrating how to reproduce the issue.
  3. #3
    Quote Originally Posted by RCN View Post
    Please post a complete (but simplified) code sample demonstrating how to reproduce the issue.


    Now I have the problem also with a combo box here is the code of the combobox :

    List<myList> mylist=getMylist();
    comboBox combo=new combox{
    DisplayField="DataType"
    Store=
    {
    new Store {
    Data=mylist;
    ID="myStore";
    AutoDataBind=true;
    Model={
    new Model
    {
    Fields= {
    new ModelFields{
    name="DataType"
    }
    },
    Reader={
    new ArrayReader{}
    }
    }
    }
    }
    }

    }
  4. #4
    Please wrap all code samples in [CODE] tags.

    Some more details are in our forums guidelines.
    Forum Guidelines For Posting New Topics
    More Information Required
  5. #5
    Quote Originally Posted by RCN View Post
    Please wrap all code samples in [CODE] tags.

    Some more details are in our forums guidelines.
    Forum Guidelines For Posting New Topics
    More Information Required

    Sorry , here is my code :
    List<myList> mylist=getMylist();
    comboBox combo=new combox{
    DisplayField="DataType"
    Store=
    {
    new Store {
    Data=mylist;
    ID="myStore";
    AutoDataBind=true;
    Model={
    new Model
    {
    Fields= {
    new ModelFields{
    name="DataType"
    }
    },
    Reader={
    new ArrayReader{}
    }
    }
    }
    }
    there is something wrong with the store it reserve the exact number of data returned but no data appears like my list contains 33 rows then a blank 33 rows appears in the combox when I write the exact code in this way I get my data :

    List<myList> mylist=getMylist();
    
    ComboBox comb=new comBox();
    comb.DisplayField="DataType";
    Store store=new Store();
    store.Data=mylist;
    store.AutoDataBind=true;
    store.DataBind();
    Model model=new model();
    Modelfield m=new ModelField();
    m.name="DataType";
    model.Fields.Add(m);
    store.Model.Add(model);
    comb.Store.Add(store);
    Everything is fine in the above code but I am using the first one because it is nested in a gridPanel I am missing something here but I don't know what it is
    Last edited by fragrance22; Dec 20, 2012 at 5:10 PM.
  6. #6
    Quote Originally Posted by fragrance22 View Post
    Sorry , here is my code :
    List<myList> mylist=getMylist();
    comboBox combo=new combox{
    DisplayField="DataType"
    Store=
    {
    new Store {
    Data=mylist;
    ID="myStore";
    AutoDataBind=true;
    Model={
    new Model
    {
    Fields= {
    new ModelFields{
    name="DataType"
    }
    },
    Reader={
    new ArrayReader{}
    }
    }
    }
    }
    there is something wrong with the store it reserve the exact number of data returned but no data appears like my list contains 33 rows then a blank 33 rows appears in the combox when I write the exact code in this way I get my data :

    List<myList> mylist=getMylist();
    
    ComboBox comb=new comBox();
    comb.DisplayField="DataType";
    Store store=new Store();
    store.Data=mylist;
    store.AutoDataBind=true;
    store.DataBind();
    Model model=new model();
    Modelfield m=new ModelField();
    m.name="DataType";
    model.Fields.Add(m);
    store.Model.Add(model);
    comb.Store.Add(store);
    Everything is fine in the above code but I am using the first one because it is nested in a gridPanel I am missing something here but I don't know what it is


    Any reply ??
  7. #7
    In first example, you are creating an ArrayReader. In the second, you are not. If you are seeing blank records in the UI, that usually means some kind of mapping error between the store's reader and what you are binding to the store. I am going to guess that you should use a JsonReader or don't even specify a reader since by default, it's Json.
  8. #8
    Quote Originally Posted by jchau View Post
    In first example, you are creating an ArrayReader. In the second, you are not. If you are seeing blank records in the UI, that usually means some kind of mapping error between the store's reader and what you are binding to the store. I am going to guess that you should use a JsonReader or don't even specify a reader since by default, it's Json.
    I did solve the problem by identifying the store first in the design mode then assigning the StoreID .. :)

    Thank you very much :)
  9. #9
    Sorry but until now i am not sure what is your problem. You stated a GridPanel problem but you provided a ComboBox example, not related to the issue described on the opening post.
  10. #10
    Quote Originally Posted by RCN View Post
    Sorry but until now i am not sure what is your problem. You stated a GridPanel problem but you provided a ComboBox example, not related to the issue described on the opening post.
    In both cases I had a problem empty data ... Both cases reserves a place for my data but no data is displayed .

Similar Threads

  1. Problem in gridpanel in v2.0
    By Oliver in forum 2.x Help
    Replies: 2
    Last Post: Apr 02, 2012, 2:38 AM
  2. [CLOSED] Problem with drag and drop from gridpanel to gridpanel
    By PoloTheMonk in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 16, 2011, 11:42 AM
  3. GridPanel Problem
    By pratikshah in forum 1.x Help
    Replies: 0
    Last Post: Dec 29, 2010, 4:29 AM
  4. Problem with GridPanel
    By magisystem in forum 1.x Help
    Replies: 2
    Last Post: Oct 06, 2010, 10:26 AM
  5. Replies: 5
    Last Post: Jun 10, 2009, 5:13 AM

Tags for this Thread

Posting Permissions