Results 1 to 3 of 3

Thread: Dynamic Grid

  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default Answered: Dynamic Grid

    Hi,
    how can I create and popolate a Grid with a dynamic bean?
    This dynamic bean has an indeterminate number of fields, so the number of columns of the Grid is also undetermined ( but determined only at runtime).
    In addition, I have a list with the names of the columns corresponding to the dynamic bean's fields.

    Thanks and regards,
    Alessandro P.

  2. The tail end of today's forum post is especially relevant to this topic: http://www.sencha.com/blog/building-gxt-charts/

  3. #2
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Answers
    109
    Vote Rating
    93
      0  

    Default

    In short, yes it is possible - simply build a ValueProvider that can read from your generic object. If you actually have a class that changes from day to day, make the process that updates it also update the PropertyAccess, and add any additional wiring to build the grid - GXT can't magically add new code based on other changing code, as GWT compiled code cannot do reflection/introspection.

    If your model is backed by a Map of some kind, it should be possible to build a ValueProvider that reads into that map and gets whatever key you are supporting. Check out a new example in the nightly build that shows how this can be achieved, specifically the MapValueProvider class http://staging.sencha.com:8080/examp...namiclinechart

  4. #3
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Answers
    109
    Vote Rating
    93
      0  

    Default

    The tail end of today's forum post is especially relevant to this topic: http://www.sencha.com/blog/building-gxt-charts/

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •