2

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

karvoynistas
  • 1,295
  • 1
  • 14
  • 30
  • Check http://stackoverflow.com/a/16283333/2208271. Its possible to use other CSS attributes to set background color, etc. as well. – Sithsu Aug 15 '13 at 14:47

2 Answers2

0

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.

Alain BUFERNE
  • 2,016
  • 3
  • 26
  • 37
0

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()

Abhijith
  • 2,592
  • 5
  • 18
  • 30