Click here to Skip to main content
15,919,479 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am applying color for each row of my grid, I stored color value's in my SQL database, and when I retrieve the color value's from database and apply to current row of grid, it's not applying the original color.
The Window color only applying to my grid current row, my color value is "oxffffff80" but only the window A=255,R=255,G=255,b=255 this color only applying to current row, what shall I do to apply exact color that I stored in my database?

[edit]Tidy up only[/edit]
Posted
Updated 20-Nov-10 4:37am
v2
Comments
[no name] 20-Nov-10 9:42am    
Is this for Windows or Web?
sameertm 20-Nov-10 10:27am    
its windwow application
OriginalGriff 20-Nov-10 10:40am    
Without seeing your code it could be anything!
We need to see the relevant code fragments: Where you save into the database, where you read out from the database, and what you do with the values you read out.
In addition, please state what the field definitions in the database are.
Please edit your question, and provide this so we can help you!

1 solution

You're probably going to have to handle the Paint event and draw everything yourself to pull this off. You could alternatively just create a new object that inherits from the GridView, and do it there. In fact, I'd probably go that route.

For instructions on doing either of those two things, use google. In fact, I would even make a halfhearted attempt to find a custom control that's already been written. Again, google is your friend (and you might even find an article about it here on CodeProject.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900