Dataset Row Formatting/Style in DataGris

G

Guest

I have a Dataset (ds) binded to a Datagrid (dg).

Based on a value in a Datacolumn (dc) within the Datarow (dr) of the ds, I
want the dr to be displayed in either black or red text. If the dc column is
1, then display the row in black, if the value is 0 then display in red.

What is the easiest way to achieve this?

I could just hack my way by appending HTML text so some Label string.

But I was wondering if there was a more elegant way of doing this? Perhaps
through an ItemTemplate of the dg?

Does anyone know of any examples of doing something like this?
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top