mleibman / SlickGrid

A lightning fast JavaScript grid/spreadsheet
http://wiki.github.com/mleibman/SlickGrid
MIT License
6.81k stars 1.98k forks source link

Sticky footer row(s) #78

Open minorbug opened 14 years ago

minorbug commented 14 years ago

Have a way to define the last x rows of data to be "sticky", like the header, so they are always visible. This will be useful for projects that have calculated column totals that must be always visible.

andrewchilds commented 14 years ago

This is unfortunately a showstopper for me. I need to either hack support for a "totals" row myself or try using jqGrid, which supports a "summary" row. But I'd much rather use SlickGrid.

mleibman commented 13 years ago

I have added fixed header row recently... just need to do that same for the footer.

andrewchilds commented 13 years ago

Hey Michael, sorry I should've updated this ticket - I added support for fixed header/footer rows in my fork in October, though it alters the Slick.Grid signature to (container,data,columns,options,totals) as I wanted to be able to define the values of the "totals" row apart from the data, vs. the original issue request which was take the last x rows of data and make them the footer. I have an example page at https://github.com/andrewchilds/SlickGrid/blob/master/examples/example15-totals.html

mleibman commented 13 years ago

Yes, I remember looking that code over. The reason that approach didn't work for me was that it was static and did not allow any manipulation of the DOM or underlying data which is a must.

dcendents commented 13 years ago

I'm starting to use SlickGrid 1.4.3, and using the example-header-row, I've copied some code from 2.0a1 to use the secondary header row as a "total row".

I'd rather have it at the bottom, so I'm all for this new feature!

dcendents commented 13 years ago

In fact I just moved the header row after the $viewport (Still using 1.4.3) and now it shows at the bottom.

I have some javascript to change the cell content when a row is modified (I use it as a total row).

I used the following example: http://mleibman.github.com/SlickGrid/examples/example-header-row.html to get started and borrowed some code from 2.0a1

andrefaria commented 13 years ago

It's fixed footer going to be officially supported?

CoffeeJerk commented 12 years ago

I need this feature as well. Currently we hack together two grids to do it, sure would be nice to do it with one.

dholcombe commented 12 years ago

Voting this feature request up by commenting...

jeremykendall commented 12 years ago

Bump, +1.

appublic commented 12 years ago

Another bump, +1

fourcolors commented 12 years ago

I would like a fixed "row header" too. We have a use case where we need a both fixed column and row header. Will this support this?

mleibman commented 12 years ago

SlickGrid already has a fixed header row.

On Thu, Sep 20, 2012 at 12:31 PM, Sterling Cobb notifications@github.comwrote:

I would like a fixed "row header" too. We have a use case where we need a both fixed column and row header. Will this support this?

— Reply to this email directly or view it on GitHubhttps://github.com/mleibman/SlickGrid/issues/78#issuecomment-8742672.

fourcolors commented 12 years ago

@mleibman Currently this example http://mleibman.github.com/SlickGrid/examples/example-header-row.html has a fixed column header however we are looking for the first columns rows to be fixed so we can scroll left to right and keep a column always visible on the left side of the grid.

Is this possible?

mleibman commented 12 years ago

That functionality is called "fixed columns" or "frozen columns" and is not available yet.

On Wed, Sep 26, 2012 at 10:16 AM, Sterling Cobb notifications@github.comwrote:

@mleibman https://github.com/mleibman Currently this example http://mleibman.github.com/SlickGrid/examples/example-header-row.html has a fixed column header however we are looking for the first columns rows to be fixed so we can scroll left to right and keep a column always visible on the left side of the grid.

Is this possible?

— Reply to this email directly or view it on GitHubhttps://github.com/mleibman/SlickGrid/issues/78#issuecomment-8897618.

natofsky commented 11 years ago

Is fixed footer still on the todo list?

antonioedirane commented 11 years ago

Bump, +1.

mleibman commented 11 years ago

Yes :)

douglasgrava commented 11 years ago

Bump, +1.

Mukaram commented 11 years ago

Yes please. Bump, +1

DaHoopster commented 11 years ago

Yes, bump +1

oldtinroof commented 11 years ago

Yes please! +1

ticaboo commented 11 years ago

bump bump bump 3 years on. +1

FnTm commented 11 years ago

Yes please, +1!

terrychentc commented 11 years ago

Please, +5

schalivendri commented 11 years ago

+1, ETA?

viveks-m commented 11 years ago

+1 Please

konrade commented 11 years ago

Yes please, +1

mleibman commented 11 years ago

Which feature are you guys +1'ing? Freezing n bottom rows, or having a fixed footer row like in http://mleibman.github.com/SlickGrid/examples/example-header-row.html? If it is the former, it's not going to get implemented. In case of the latter, can you give me an actual use case for it? It just seems that most people want it for a totals row, for which it is a really really bad implementation. For totals, you should implement a data provider similar to how DataView does it. That way, the totals row will be an actual normal row that is a part of the grid as opposed to a dumb container that you have to manipulate manually.

mleibman commented 11 years ago

Please chime in.

jeremykendall commented 11 years ago

My +1 was for

having a fixed footer row like in http://mleibman.github.com/SlickGrid/examples/example-header-row.html?

It's been a while since I've worked on the project that prompted my +1, but I remember having trouble creating a fixed totals row using a data provider.

Would you be willing to provide a specific example of a fixed footer row providing column totals using a data provider? That would probably close this out and kill all the +1s.

schalivendri commented 11 years ago

My +1 was for having a fixed footer row like in http://mleibman.github.com/SlickGrid/examples/example-header-row.html

DaHoopster commented 11 years ago

My +1 was for having a fixed footer row like in

http://mleibman.github.com/SlickGrid/examples/example-header-row.html

JonBons commented 11 years ago

I worked on a footer totals plugin that I don't have time to maintain anymore. I'm not great at JS but I needed it for a specific project so I got it done...

https://github.com/JonBons/SlickGrid Example: http://vps.mattgraham.me/slickgrid/examples/example-plugin-summaryfooters.html

schalivendri commented 11 years ago

@JonBons There is an issue with column resize, the total columns doesn't align properly with grid column

mleibman commented 11 years ago

@jeremykendall Here you go - https://github.com/mleibman/SlickGrid/blob/master/examples/example-totals-via-data-provider.html.

jeremykendall commented 11 years ago

@mleibman Awesome. Will you be posting it along with the other examples so we can see it in action?

mleibman commented 11 years ago

Yep, just pushed the gh-pages and updated the wiki - http://mleibman.github.io/SlickGrid/examples/example-totals-via-data-provider.html.

jeremykendall commented 11 years ago

@mleibman That, sir, is precisely what I was looking for. Thanks!

pgbakker commented 11 years ago

Tnx for that example @mleibman. However, what we're interested in is more the implementation @JonBons has done, with the totals in a footer below the grid, so the totals remain in view when you have more rows than fit in the viewport.

@schalivendri: I don't see what you're seeing, they seem to be aligning just fine @JonBons: if the combined width of the columns don't fit the viewport and the user scrolls to the right, the footer doesn't scroll with the rest of the grid, so the columns don't align anymore

pgbakker commented 11 years ago

@JonBons Also like your other addition: http://vps.mattgraham.me/slickgrid/examples/example-plugin-summaryfooters-grouping.html. However, if I filter the records displayed using the slider, the totals in the footer do not update

schalivendri commented 11 years ago

@pgbakker: When the columns widths is increased to more than the viewport width, the horizontal scrollbar appears only for viewport. If you try to scroll to right, you will see the alignment issue.

pgbakker commented 11 years ago

@schalivendri ok, yes, that is what I'm seeing as well. Thought you meant that they weren't lined up initially

JonBons commented 11 years ago

@pgbakker I have fixed the issue with the totals not updating when using the slider and when groups are collapsed: http://vps.mattgraham.me/slickgrid/examples/example-plugin-summaryfooters-grouping.html

If you have not messed with it yet, there is draggable groupby support in that example.

The issue with the scrolling is a little more complex; I believe it is caused by the fact that the summary footer html is outside of the grid and all the manipulative stuff is being done to just the grid html. I'll have to figure out how to get the Summary Footer reacting to the events the grid is throwing and figure out how to handle that.

If anyone has any idea's I'd love them.

schalivendri commented 11 years ago

@JonBons I am listening to 'onColumnsResized' event on grid and resizing all columns in summary footer. This is working, but I am looking for a better solution.

martin0258 commented 10 years ago

For those who wants a fixed total row, I found a plugin slickgrid-totals-plugin. Sadly, I cannot make it work (without error).

BomanIrani commented 10 years ago

@martin0258 To use slickgrid-totals-plugin (https://github.com/paynen/slickgrid-totals-plugin) you need to use an earlier version of SlickGrid. Note that it'll still be broken in FF, but works great in Chrome and Safari.

ddomingues commented 9 years ago

Hi! I implemented this and others features on my fork: https://github.com/ddomingues/X-SlickGrid ! Take a look http://ddomingues.com/X-SlickGrid/liveDemo/examples/example-group-header.html

gkostov commented 9 years ago

@mleibman mentioned "just need to do that same for the footer" so I believe #1054 is exactly what the footer is supposed to be ;-)

marbetschar commented 9 years ago

@mleibman will @gkostov 's change be merged into SlickGrid? Since I got the same use case over here.