Background color of datagrid of specific rows

  • Thread starter Thread starter Harsh
  • Start date Start date
H

Harsh

How to change background of rows of the datagrid based
on value of some particular column of the row in the
datagrid.

I am currently filling in the data into the grid using the
dataset. Now based on the values in certain column i want
to change the back ground colour of the row.

This change in colour required is NOT necessarily in any
specific order.

Now this specifically need to be done on Compact Framework.

Any help is appreciated.

Thanks a lot in advance.

Harsh
 
Take a look at http://www.opennetcf.org/Forums/topic.asp?TOPIC_ID=350
The sample code actually creates alternating rows, but it should be easy to
modify it to choose a color based on the row content. Keep in mind, this
relies on the knowledge of the DataGrid control iternal structure and can
potetnially stop working after a Service Pack or major release (most likely)
 
Back
Top