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 working on vb.net

I am searching in datagrid column columns. I would like to change fore/back color of all found text, not whole cell/rows

anybody can help me
Posted
Comments
A. K. Maurya 22-Sep-12 7:02am    
Thanks
Through this code cell color is changed. but see what i really want. I want to change color of few text only. not the complete cell.

1 solution

for cells
VB
Grid.Rows(iRow).Cells(iCell).Style.BackColor = Color.White

for rows
VB
Dim cs As DataGridViewCellStyle =  New DataGridViewCellStyle()
cs.BackColor = Color.White
Grid.Rows(iRow).DefaultCellStyle = cs
 
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