Grid: disable sorting of columns

How do you disable sorting of grid columns?

grid.getColumn("propertyId of column").setSortable(false);

Thanks Kim.

What if I want to disable sorting throughout entire columns?


You can run some code on all Grid column using a simple for loop:

for (Column c : grid.getColumns()) { // Insert your code here } //Teemu

Thanks Teemu. Lovely code. :slight_smile: