Background color of datagrid of specific rows

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
 
A

Alex Feinman [MVP]

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top