Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I take a one datagridview as dgv1
I want a change color of cell for give error.
How do that?
Posted

Hi
You can do that for this code

Dgv1.rows(I).cell(I).style.backcolor=color.red

For that you can change particular cell of particular column


Best of Luck
 
Share this answer
 
Comments
Ankit Rajput 4-May-11 7:58am    
Nice Answer. My 5
Hi,

You can access a cell like this
dgv1.Rows[RowIndex].Cells[Columnindex]


It will return a cell obejct. now you can do so much things with cell.

Regards
AR
 
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