Datagrid forecolor from dataview.

G

gobinath

Hi,

How do I associate a column in the dataview with a color property of
datagrid forecolor, more specifically a particular cells forecolor.

I'm associating a dataview with the datagrid and the values are showing OK.
But I want the fore color of a cell being set on specific condition. I'm
thinking of adding a new column to the table which has an expression to
determine the color. And if this is associated with the cell fore color, it
should work great as I just need to keep on updating the data.

I tried but couldn't find a way to do this. Any help would be of great use.

Thanks in advance,

Gobi.
 
G

gobinath

Cor,

Thanks a lot on the reply.

The sample shows doing things on the grid, meaning a new type of column is
created which calculates the color. But it would be great if the calculation
is done in the dataset itself and being able to associate. The advantage
would be *) As there are columns for expressions which takes strings, the
expression can be given in an xml file which can be changed if need be.
*) I can associate the same dataset to different UI and all of them will
share the same color schema.

We can associate a values from the dataset to either the "Value" property of
a textbox or the "Color" property. similarly is there a way to associate the
values to the "Color" property of the datagrid. It would be of great use and
reduce some work for us.

Does my question make sense???

Thanks again,
Gobi.
 

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