PDA

View Full Version : Removing Sorting and Column Visibility options



bevara.siva
7 Apr 2014, 4:59 AM
Hi,

We are using Sencha Architect 3.0 and ExtJs 4.2.x.

We wanted to remove the options for sorting and column visibility that appear on each column of the grid.
48599


How can I remove these options?

Do we have an option to save the columns that user selects to display, and show only those columns to the user based on their selection instead of doing that again and again?

Please help.

Regards,
SivaPrasad.B

Farish
7 Apr 2014, 5:24 AM
you can use menuDisabled: true on the grid columns to hide the menu which shows sorting and column show/hide options.

enableColumnHide: false on the grid panel only removes the column show/hide option (sorting options are still shown).

fschaeffer
7 Apr 2014, 7:18 AM
Hello,

you could use the State-functions from Ext and use a CookieProvider
http://docs-origin.sencha.com/extjs/4.2.2/#!/api/Ext.state.CookieProvider

to store the currently selected columns for a user in the grid

http://docs-origin.sencha.com/extjs/4.2.2/#!/api/Ext.state.Stateful-cfg-stateful

If a user selects column options they will be stored in the cookie, after relogin the selected options are applied to the grid based on the user selection. Works like a charm in an application we wrote and is highly appreciated by our users :)