2

The question says it all. I can set the column, on which to sort, in code:

cols[colIdx].sort = { direction: uiGridConstants.DESC, priority: 1 };

But it doesn't actually perform the sort, just puts a sort icon in the header. User has to actually click on the column header for the sort to occur. What additional code do I need to have the sort happen programmatically?

Been at this for hours, any thoughts would be greatly appreciated. Rick.

1 Answer 1

2

From the gridApi you can call gridApi.grid.sortColumn(column).

Sign up to request clarification or add additional context in comments.

1 Comment

This is the correct approach. Also, answer here will help get you in the right direction - stackoverflow.com/questions/32650456/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.