1. #1
    Ext User
    Join Date
    Sep 2007
    Posts
    48
    Vote Rating
    0
    thejdog is on a distinguished road

      0  

    Default Best Way To Do Stats Data?

    Best Way To Do Stats Data?


    I have a question, what is the best way to "display" stats data? In a table?

    Say I have a table with Site Name, Number of Signups, Gross Income. What is the best way to display that, then also have a Total Bar as the LAST row and only as last row, but the other rows are sortable?

    Grid I don't think will work as it won't work, as it won't lock the last row.

    Unless I could do a:
    Code:
    grid.on("load", function () {
      grid.getRowSelectionModel().selectLastRow();
      var lastRow = grid.getRowSelectionModel().lock();
    }
    But looking at the documentation that wouldn't work, as that would just lock the selection(s). So what would be the best way to display this type of data?

    Thanks in advance!

  2. #2
    Ext User
    Join Date
    Sep 2007
    Posts
    48
    Vote Rating
    0
    thejdog is on a distinguished road

      0  

    Default


    Anybody have anything thoughts about how this would work well? Be great

    Thanks!

  3. #3
    Ext JS Premium Member
    Join Date
    Aug 2007
    Location
    Germany
    Posts
    139
    Vote Rating
    1
    Spirit is on a distinguished road

      0  

    Default


    Well i dont know much about grids by now, but they aint that flexible in Ext 1.1.
    One way would be to use the last row for the sums. Before the table gets sorted take the last row out, do sorting, and put it back... hmm not very nice at all.

    But i have seen the demos from 2.0, i think there it could be very easy...
    Waiting 4 the beta myself

  4. #4
    Ext User
    Join Date
    Sep 2007
    Posts
    48
    Vote Rating
    0
    thejdog is on a distinguished road

      0  

    Default


    Quote Originally Posted by Spirit View Post
    Well i dont know much about grids by now, but they aint that flexible in Ext 1.1.
    One way would be to use the last row for the sums. Before the table gets sorted take the last row out, do sorting, and put it back... hmm not very nice at all.

    But i have seen the demos from 2.0, i think there it could be very easy...
    Waiting 4 the beta myself
    Yea it would be nice to be able to do that easily. Seems a little dirty to do that. But also, not a bad idea. But can do you a listener that when they "sort" the column it takes out the last row

  5. #5
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,664
    Vote Rating
    7
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    the row you want is not a normal row, it doesn't have to have events (mouse, contextmenu etc.)
    What you need is kind of 2nd header below the rows, but have no idea how to get this.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  6. #6
    Ext JS Premium Member
    Join Date
    Aug 2007
    Location
    Germany
    Posts
    139
    Vote Rating
    1
    Spirit is on a distinguished road

      0  

    Default


    Actually i have no grid with sorting. How is it triggered ? by click on header ?
    The grid has some listeners on header for click and doubleclick.

  7. #7
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default


    search for a post to the tune of "grid aggregate row".
    a user by the nick of rodiniz has already created an aggregate row solution for Ext 1.x that might appeal to you.

  8. #8
    Ext User
    Join Date
    Jul 2007
    Posts
    3,128
    Vote Rating
    0
    devnull has a little shameless behaviour in the past

      0  

    Default


    I am interested in this as well, but the thread i found for it is rather old and only contains a (non-functional) link to an example

  9. #9
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default


    http://www.extendersamples.qsh.eu/

    [edit]
    weird... the examples gone from the site... maybe u could pm him and let him know.

  10. #10
    Ext User violinista's Avatar
    Join Date
    Apr 2007
    Location
    Serbia
    Posts
    293
    Vote Rating
    0
    violinista is on a distinguished road

      0  

    Default


    I would like to know if this example could be reached again

    I solved this issue with adding some toolbar in gridFooter and displaying aggregated data, like this:


    I dunno if it works for you, it's just an idea...
    Last edited by violinista; 18 Sep 2007 at 7:43 AM. Reason: Wrong pic uploaded :)
    "It is better to be young, pretty and rich instead old, ugly and poor."
    (c) Alan Ford.