Dataset Row Formatting/Style in DataGris

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
Back
Top