ui-grid - How to pin a ROW to the top
问题 I'm using the angularjs ui-grid and I have a "total" row that I want to pin to the top of the grid no matter what is the current sorting. How can I accomplish that? 回答1: I think this is what you are looking for : Row Pinning Essentially add another hidden column, something 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] /