Friday, March 28, 2014

How to style a Row of CellTable when user click on a Cell (GWT)?

I want that when user click on a Cell belonging to a row of CellTable, then it will style the row.

So I tried:

       myColumn.setFieldUpdater(new FieldUpdater<String[], String>(){              @Override              public void update(int index, String[] object, String value){                  if(mycondition){                      myCellTable.getRowElement(index).addClassName(getView().getRes().css().blueText());                      myCellTable.redraw();                  }                }          });  

As stated in the above code, we can capture the index of the row, so row no is not the problem, but why nothing happened.

So How to fix it?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment