Define a SingleSelectionModel and add it to CellTable :
final SingleSelectionModel<T> ssm = new SingleSelectionModel<T>();
cellTable.setSelectionModel(ssm);
ssm.addSelectionChangeHandler(new Handler() {
@Override
public void onSelectionChange(final SelectionChangeEvent event)
{
final T selectedObject = ssm.getSelectedObject();
// do what you want
}
});
Alexandre
2011/4/28 kalpana anbalagan <[email protected]>
> Hello,
>
> I am using GWT 2.2 CellTable. I want to select a row if i click on
> any cell in that row similar to what is achieved when selecting
> checkbox in the selectionmodel. As per my requirement, we are not
> using Checkboxcell to select a row in celltable.
>
> note: all the cells in the celltable are constructed using
> "TextColumn".
>
> Can anyone help me on this.
>
> Thanks in Advance,
> Kalpana
>
> --
> 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.
>
>
--
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.