Frage

I started developing with smartgwt few weeks ago and I am having a problem I want to insert background color in specific cells of a ListGrid. The problem is that i have not access in ListGrid Elements with their indexes (for example grid(i,j)) Any idea?? Thank you

War es hilfreich?

Lösung

There are 2 ways i can think of to achieve this:

1)Hilites.Good for coloring rows based on criterion. http://www.smartclient.com/smartgwt/showcase/#grid_hiliting_formula

2)Create custom cell canvases by overriding createRecordComponent() , updateRecordComponent() and showRecordComponent()

Andere Tipps

You can use the Hilite which depend on a set of criteria which will allow you to apply a css rule on some record which satisfy the criteria. For the column you set a criteria which say field so&so equal xxx , for row number a quick solution(I don't know if you can set criteria on a row index) will be to have a hidden field which you feed with an incrementing value and where you can set a criteria on this field value.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top