Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Grid: disable sorting of columns

App Keto
6 years ago Jul 08, 2015 10:33am
Kim Leppänen
6 years ago Jul 08, 2015 10:44am
grid.getColumn("propertyId of column").setSortable(false);
App Keto
6 years ago Jul 08, 2015 10:46am
Teemu Suo-Anttila
6 years ago Jul 08, 2015 11:26am

Hi,

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

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

//Teemu
 

App Keto
6 years ago Jul 08, 2015 11:33am