Hi Suren, If you could provide more explanation as to how applying style with the RowFormatter didn't behave as you expected, that would be helpful to figure out what's going wrong. From what I can tell, you want to apply a style to the Grid that will persist through all interactions with the grid or its rows. You should be able to apply a style to the row in a straightforward way and have the style persist through interactions, unless you explicitly add event handlers that change the row style.
For an example of applying style to a table (in this case a FlexTable), check out the StockWatcher tutorial section on "Applying Style" (link below). StockWatcher Tutorial - "Applying Style": http://code.google.com/webtoolkit/tutorials/1.6/style.html Hope that helps, -Sumit Chandel On Thu, Jun 18, 2009 at 8:46 PM, Suren <[email protected]> wrote: > > HI Jim, > > Thanks for you reply. > > I am not sure, whether I explained my problem better here.. > > I want to have a row selection in a Grid. > > I was wondering, where did you get "getCellForEvent" in a Grid. > > Also the link you had posted is also having something about > Dreamsource. I am not sure what that is and how that would help me > > Thanks anyway > Suren > > On Jun 18, 1:12 pm, Jim <[email protected]> wrote: > > Here is source code I cited from GWT mail example. You can find this > > example fromhttp://www.gwtorm.com/gwtMail.jspthat include RPC- > > database layer code. > > > > public class MailList extends Composite implements ClickHandler { > > > > public MailList() { > > table.addClickHandler(this); > > } > > > > public void onClick(ClickEvent event) { > > // Select the row that was clicked (-1 to account for header > > row). > > Cell cell = table.getCellForEvent(event); > > if (cell != null) { > > int row = cell.getRowIndex(); > > } > > } > > > > } > > > > Jimhttp://www.gwtorm.com- GWT ORMhttp:// > code.google.com/p/dreamsource-orm/downloads/list > > > > On Jun 18, 12:04 am, Suren <[email protected]> wrote: > > > > > Hi All, > > > > > I am using a Grid, in which I want to implement row Selection style. > > > > > Currently, I am using rowformatter to apply a style. But thats not > > > having the expeceted behavior. > > > > > I want to select that entire row, when user clicks on any cell in a > > > Grid. Row selection should remain there, even if user clicks or double > > > clicks that cell. > > > > > Any help would be appreciated > > > > > Thanks > > > Suren > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
