Pre 1.6 you would add a TableListener for this - the JavaDoc for 1.6
tells you this method is deprecated, but to do the same thing you
should "add a click handler instead and use HTMLTable.getCellForEvent
(ClickEvent) to get the cell information (remember to check for a null
return value)"
So, something like the following should work:
final FlexTable fTable = new FlexTable();
fTable.addClickHandler(new ClickHandler(){
public void onClick(ClickEvent event) {
Cell cellForEvent =
fTable.getCellForEvent(event);
int row = cellForEvent.getRowIndex();
}
});
//Adam
On 1 Maj, 22:26, dk <[email protected]> wrote:
> Hi,
>
> I am ttying out 1.6.4 for the first time with a simple project. I
> want a FlexTable of some size and I want to know when a table cell is
> clicked. I want to know which cell was clicked.
>
> I am confused. I see the addClickHandler method on FlexTables but I
> am not seeing the path that leads from adding the onClick handler to
> finding the row/col coordinates of the clicked table cell.
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---