I have a table where the user clicks a check box to select a row.
I want to have it where the user clocks on the row of interest and have that row fill in with a colored background. How do I go about this in GWT?
EDIT: I would like to know how this can be achieved using the FlexTable. Thank you very much
To manipulate the row style on a click action add a
ClickHandlerto the FlexTable object. In theonClick(ClickEvent)you can get the cell clicked via the FlexTable methodgetCellForEvent(ClickEvent). The Cell returned contains information on the row (and column) number that was clicked. ViagetRowFormatter().getElement()you can get the element of the row and add a stylename to the row, to add color or directly in code set the color on the row in code.