This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / C# Window Application: How to set DataGrid row colorIn my C# windows application. I need to setup different row color base on different value. for example, if coloum1 value is 1, set this row is Red, if column1 value is 2, set this row is blue, etc. Any help would be appreciated.
-prod4less(prod4less);
2004-8-4
{228}
(#1829405@0)
-
Check this site and see if it's useful to you
-schen(糊涂阿福);
2004-8-5
{61}
(#1830489@0)
-
Thanks 糊涂阿福, it's only set color in one cell, I need to set color for whole row.
-prod4less(prod4less);
2004-8-7
(#1833005@0)
-
单个cell都可以了,整行不就是个loop吗?
-guestagain(guest again);
2004-8-7
(#1833017@0)
-
it's different. it likes an event in cell. you can not find other cells in same row. I am a new guy in C#. I have no more experience in DataGrid.
-prod4less(prod4less);
2004-8-7
(#1833046@0)
-
服了你了,那只是一个例子,你可以用这种思路去实现你的要求。
-guestagain(guest again);
2004-8-7
(#1833057@0)