0

In a grid with 5 columns, I would like to have the possibility of sorting only for columns 2 and 4. What is the correct demarch for implement this ? - declare sortable to true for columns 2 and 4 - what else ?

Bertaud
  • 2,888
  • 5
  • 35
  • 48

1 Answers1

1

Default value of sortable property is already true (see here). So you have to include

sortable: false

property in the definition of all columns in colModel with exception columns 2 and 4. If you have many columns, then it would be better to change defaults for colModel items:

cmTemplate: { sortable: false }

After that you should include sortable: true in columns 2 and 4. In the way you can change any other defaults for colModel. See the answer for more details.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • @Bertaud: You are welcome! What answer about "empty column" you mean? – Oleg Apr 20 '12 at 13:17
  • http://stackoverflow.com/questions/10178575/number-of-records-inferior-to-the-number-of-rows-vertical-scrollbar – Bertaud Apr 20 '12 at 18:01