User (Old forums)MemberMay 24, 2004 at 2:24 amPost count: 23064
Tell me how can I set the color of each row according the values.
value of some column and color
1 – red
2 – green
3 – blue
so if cell of this row and column has some value I i should set the background of the row to the appropriate color.
I have only idea to override OnPaint event. Is it right?
Imported from legacy forums. Posted by tripolox (had 4151 views)User (Old forums)MemberMay 28, 2004 at 11:09 amPost count: 23064
Hi you can put code in the ADDINGDATAROW event. This event fires every time a row is added to the grid – so you can check values in there and then color the row based upon the values.
The current row being added is:
Imported from legacy forums. Posted by fgauer (had 313 views)User (Old forums)MemberAugust 5, 2005 at 9:29 amPost count: 23064
I like it but if I have a master detail grid bound to a dataset then it becomes a bit tricky to determine what’s where when it comes to determining the cell value. You have to determine whether or not a cell column might be in the row and then go from there.
Is it possible to determine what table the data row is a part of in the dataset? I don’t know somkind of name or reference to the table itself? I’m sure it’s possible I just can’t find out where it is.
Imported from legacy forums. Posted by Chris (had 296 views)User (Old forums)MemberAugust 5, 2005 at 9:55 amPost count: 23064
OK, I’m a fool.
For anyone interested then the event happens for each detail grid as well.
Took me ages to find that. What a clown.
Imported from legacy forums. Posted by Chris (had 344 views)Odi [Xceed]SpectatorAugust 5, 2005 at 10:56 amPost count: 426
I’d like to point out that if you ever get stuck like this again, please don’t hesitate to shoot off a quick email to email@example.com with your question. They will reply back (during Xceed business hours, often very quickly) with a response that could save you a lot of time.
I know, it would be great if support monitored the forums – we’re considering our options in this regard.
Imported from legacy forums. Posted by Odi [Xceed] (had 406 views)
- You must be logged in to reply to this topic.