1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    3
    Vote Rating
    0
    pera76 is on a distinguished road

      0  

    Default Answered: Dynamic Grid

    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 - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,717
    Answers
    109
    Vote Rating
    89
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      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 - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,717
    Answers
    109
    Vote Rating
    89
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


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

Thread Participants: 1

Tags for this Thread