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

Create Pinned (frozen) rows feature

Open swalters opened this issue 12 years ago • 19 comments

While not a 2.x feature, allow the user to freeze a row or rows at the top or bottom of the viewport would be the cat's meow.

swalters avatar Feb 05 '14 21:02 swalters

Cat's meow indeed! +1

roblarsen avatar Feb 05 '14 21:02 roblarsen

Yeah please, pretty please :+1:

georgeslegros avatar Feb 12 '14 14:02 georgeslegros

This is an important feature to have. Please try to address this as it would be a good feature to include.

ermyasgit avatar May 23 '14 15:05 ermyasgit

Yes good to have it.

rajulkansara avatar Jun 19 '14 01:06 rajulkansara

+1 too!

repejota avatar Jul 01 '14 16:07 repejota

This is complete in 3.0.

c0bra avatar Sep 23 '14 14:09 c0bra

Any Update?

senstar2 avatar Dec 01 '14 14:12 senstar2

I have extensively search this feature in 3.0 (Row Pinning) but i could not figure out. please advice. May be i am not interpreting well.

rajulkansara avatar Dec 05 '14 20:12 rajulkansara

+1

cerdman avatar Mar 04 '15 22:03 cerdman

This feature is still not available or I am not able to find this? Please reply

himsraw avatar Mar 17 '15 06:03 himsraw

This feature is available and present in 3.0, tutorial is http://ui-grid.info/docs/#/tutorial/203_pinning

PaulL1 avatar Mar 17 '15 06:03 PaulL1

I am talking about row pinning here. I want a frozen row at the top of the grid just below the header.

himsraw avatar Mar 17 '15 06:03 himsraw

Nope, that's not available.

PaulL1 avatar Mar 17 '15 06:03 PaulL1

Has anyone worked on freezing of the top most row? Any pointers would be very much appreciated.

himsraw avatar Mar 17 '15 07:03 himsraw

This might be a temporary but only available solution. To freeze a row at top(other than header), you can move footer above view port. Go to ui-grid-unstable.js file. Search for uiGridRenderContainer template cache.

old code: $templateCache.put('ui-grid/uiGridRenderContainer', "[div class="ui-grid-render-container" ng-style="{ 'margin-left': colContainer.getMargin('left') + 'px', 'margin-right': colContainer.getMargin('right') + 'px' }"][div ui-grid-header][/div][div ui-grid-viewport][/div][div ui-grid-footer ng-if="grid.options.showColumnFooter"][/div][/div]" );

New code: $templateCache.put('ui-grid/uiGridRenderContainer', "[div class="ui-grid-render-container" ng-style="{ 'margin-left': colContainer.getMargin('left') + 'px', 'margin-right': colContainer.getMargin('right') + 'px' }"][div ui-grid-header][/div][div ui-grid-footer ng-if="grid.options.showColumnFooter"][/div][div ui-grid-viewport][/div][/div]" ); Note the position of footer div. I have just shifted it before viewport. That's it. No other change required.

mehakjain avatar Jul 21 '15 12:07 mehakjain

Could this feature request be reopened since it was wrongfully closed?

lannotimo avatar Apr 05 '17 12:04 lannotimo

@c0bra It seems this was closed by mistake; while column pinning has been implemented, row pinning has not. On our project we'd like to have a row that batch updates all other selected rows, and this is on a grid that already has several pinned columns (so it's difficult to fake/work around it). Thanks!

rsoren514 avatar May 18 '17 17:05 rsoren514

Please reopen this feature - it does appear to have been closed by mistake upon the completion of column pinning. This feature is row pinning.

jitterbox avatar May 19 '17 19:05 jitterbox

My solution for row pinning is to create a hidden column that looks like this:

{
 field: 'pinned',
 visible: false, 
 sort: {direction: uiGridConstants.ASC, priority: 0}, //use uiGridConstants.DESC for pinning to the bottom
 suppressRemoveSort: true, 
 sortDirectionCycle: [uiGridConstants.ASC]  //use uiGridConstants.DESC for pinning to the bottom
}

Then include a button for each row to toggle their 'pinned' state.

Row entities which have pinned = true rise to the top, even when other sorting are applied.

coexist avatar Jun 11 '17 14:06 coexist