That was my first idea, but on each table redraw I get null pointer exception when i want to addClassName on row element. With other words table.getRowElement(rowIndex) return null.
On Tue, Aug 24, 2010 at 4:30 PM, Thomas Broyer <[email protected]> wrote: > > On 24 août, 13:22, Lazo Apostolovski <[email protected]> wrote: > > My question is simple. How to set style on specific row on CellTable? > > > > For example I want to show table with data for clients who paid, who > > not paid and who payment is processing, but each row need to be > > colored differently. > > I want to set green background color on row for clients who paid, > > yellow color background color for client who waiting for processing > > payment and red background color style for clients who not paid. > > > > How can I do this? > > table.getRowElement(rowIndex) then use addClassName or getStyle; but > you'll have to do it again each time the CellTable redraws itself, > which happens each time the row data, range, or selection changes (and > there's no event to inform you). > > It might be worth raising the issue on the issue tracker (or the > design doc Wave), or posting to the GWT-Contributors group asking for > an enhancement (and a hint at how to do it with M3). At a minimum, > CellTable could provide an overridable proteted method to get the row > styles, instead of limiting them to even/odd and selected. > > -- > 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]<google-web-toolkit%[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.
