Results 1 to 4 of 4

Thread: Details data in Grid

  1. #1
    Ext JS Premium Member CutterBl's Avatar
    Join Date
    Aug 2007
    Location
    Nashville, TN
    Posts
    237

    Question Details data in Grid

    OK, don't know if this is possible, but I figured I would ask. I have a paging grid with 10 columns. What I would like to do is:

    1. click a row
    2. have a 'details' section expand/accordian out below the record
    3. populate this new space with information I retrieve with an Ajax call


    The row click? No problem. The Ajax call? No problem. The rest of it? Well, I'm not even sure it's possible. Anyone? Any ideas?

  2. #2
    Ext Premium Member BernardChhun's Avatar
    Join Date
    Mar 2007
    Location
    Quebec, Canada
    Posts
    831

    Default

    hey cutterBl,

    you need to switch the column's renderer to make the "expand" happen.

    look at the source code of this example : http://extjs.com/deploy/ext/examples/grid/paging.html

    the different renderers are on line 37 of the paging.js file
    the renderer switcher is on line 118.

    you will probably have to use an animation between the renderer switch though

    good luck

  3. #3
    Ext JS Premium Member CutterBl's Avatar
    Join Date
    Aug 2007
    Location
    Nashville, TN
    Posts
    237

    Default Expand?

    Bernard, I'm not sure that would work? The renderer is specific to the column/cell. If I apply a custom renderer (as in the example) that would only take care of a single column within my grid, which is 10 columns wide. The details I would want to show would need to span the full width of the grid, possibly even containing a grid of it's own (though unlikely with the IE issues I fought yesterday). Unless I am thoroughly missing something, but it doesn't seem so from the example of the paging grid.

  4. #4
    Ext Premium Member BernardChhun's Avatar
    Join Date
    Mar 2007
    Location
    Quebec, Canada
    Posts
    831

    Default

    ohh I see! You're looking for something like the first grid in this example:

    http://extjs.com/playpen/ext-2.0/exa...rid/grid3.html

    unfortunately, it's from Ext 2.0's new gridView

    as for my answer earlier, I was thinking about making 10 custom renderers and making it look like a single row with CSS...but that might way too much work...

Posting Permissions

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