*
The moose likes GWT and the fly likes GWT DataGrid Sorting and Coloring Cells (GWT 2.4) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "GWT DataGrid Sorting and Coloring Cells (GWT 2.4)" Watch "GWT DataGrid Sorting and Coloring Cells (GWT 2.4)" New topic
Author

GWT DataGrid Sorting and Coloring Cells (GWT 2.4)

Ron Meyer
Greenhorn

Joined: Jun 26, 2012
Posts: 7
Hello,

I try to sort an DataGrid which has color attributes set to its cell's programmatically.

I've done this via


This works great - note that on the real thing, the color code is different per row object and not static - so CSS does not work here.

I also override the DataGrids redraw method to color the cells like this:





This all works great, but then i switched to ListDataProvider because i needed column sorting.
But this doesnt work, only in some cases, the color is applied.
I believe its a time race.

If the columns sort identically, e.g. the click on Sort would not change the order, due to identical entries,
the color appears. If the order indeed changes, the cells are not colored.
Anyone knows what i'm missing here?

Since dataGrid.redraw() is not triggered by Sorting, i override the onColumnSort method in addition.
The dataGrid.redraw() should run after Sorting is done i believe .....






Any help is appreciated.
Thanks
 
 
subject: GWT DataGrid Sorting and Coloring Cells (GWT 2.4)
 
Similar Threads
SWING Multiple GUI
Need help with dojo datagrid sorting
DataGrid: update cell without refreshing page
Graphics and Swing??
CellTable sorting : sorting several columns ?