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 ?
Asked
Active
Viewed 63 times
1 Answers
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.
-
@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