ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Fixed header

Open parliament718 opened this issue 11 years ago • 8 comments

How can I get a fixed header using this plugin (without resorting to jQuery.ui.position)?

parliament718 avatar Jan 11 '15 22:01 parliament718

Sorry, I'm not sure I understand the question. The header is always fixed, is it not? What version are you using, and what are you trying to achieve?

PaulL1 avatar Jan 11 '15 23:01 PaulL1

I see how the question is confusing. So I would like the header to stay fixed while the body of the page scrolls underneath (the table having an auto height). This way the window's scrollbar is used in place of the table-level one.

parliament718 avatar Jan 12 '15 01:01 parliament718

Isn't that how the tutorials all work? http://ui-grid.info/docs/#/tutorial/102_sorting

The header stays fixed, the body of the grid scrolls.

PaulL1 avatar Jan 14 '15 20:01 PaulL1

I believe what's being asked for is the effect demonstrated by this widget: http://mottie.github.io/tablesorter/docs/example-widget-sticky-header.html

The table header remains attached to the top of the browser viewport so long its associated table is also inside the viewport.

jonrimmer avatar Jan 16 '15 09:01 jonrimmer

That's pretty cool, but not something the grid currently does. We'd welcome a pull request that added this functionality though.

PaulL1 avatar Feb 06 '15 08:02 PaulL1

I don't think this is in our roadmap, nor likely to be possible within the current grid construct and the way we scroll. I'm pushing to 4.0 for consideration of a different UI experience there.

PaulL1 avatar May 27 '15 06:05 PaulL1

Hi, I have a situation where I need the header of the columns to stay visible all the time, but as I scroll down and reach the last record, the headers of my columns will go behind my global header (fixed position).

I wonder if you have faced similar situations or if you would recommend and approach to follow.

I created one plunkr: http://plnkr.co/edit/nTO3wOQYjPdhv1rJxYyM?p=preview

As you can see below the headers of my columns are not visible after scrolling down.

screen shot 2016-01-26 at 10 34 51 am

Thanks a lot for any suggestion(s).

manuelescamilla avatar Jan 26 '16 15:01 manuelescamilla

Closing as it is not a bug.

mportuga avatar Dec 14 '16 06:12 mportuga