G
Guest
C# WinForms
I am trying to find a good solution for changing the color of a row in a
datagrid, at runtime, based on the contents of a certain cell of the row, or
a related value in the database. I cant believe it is as hard as I am
finding. This is surely a common problem.
All the solutions I have found so far though, seem very specific, and that
if I want this in various datagrids through my application I will have to
have a load of custom DataGridTextColumns with Paint overrided.
I have a custom Datagrid object which has in it various custom methods and
properties that I want all my datagrids to have, so ideally I want to put
this row colour function in there, or in a similar high up object so I dont
have to keep creating custom column styles. Has anyone done anything like
this before or does everyone just keep overriding the column style??
Thanks
Ste
I am trying to find a good solution for changing the color of a row in a
datagrid, at runtime, based on the contents of a certain cell of the row, or
a related value in the database. I cant believe it is as hard as I am
finding. This is surely a common problem.
All the solutions I have found so far though, seem very specific, and that
if I want this in various datagrids through my application I will have to
have a load of custom DataGridTextColumns with Paint overrided.
I have a custom Datagrid object which has in it various custom methods and
properties that I want all my datagrids to have, so ideally I want to put
this row colour function in there, or in a similar high up object so I dont
have to keep creating custom column styles. Has anyone done anything like
this before or does everyone just keep overriding the column style??
Thanks
Ste