user1640256
user1640256

Reputation: 1719

Sorting and filtering ExtJS headerless grid

I have a grid that doesn't have header. The requirement is to sort the grid manually. I have a list of columns in a combobox and radio buttons to specify column name and sort direction respectively. How can I sort that grid on a button's click? Similarly how can I hide/show columns in the same grid using the same approach(selecting columns from a list and clicking a button)?

Upvotes: 0

Views: 519

Answers (1)

Saki
Saki

Reputation: 5856

There are API methods you can call for both your tasks.

For sorting, mind that sorting is done by store, not by grid. You can find relevant methods in Ext.data.Store documentation - search for keyword 'sort'.

For columns manipulation, you would get the column from items collection of Ext.grid.header.Container.items and then you would call show or hide method on that column.

Upvotes: 1

Related Questions