change colour of the selectedrow in datagridview

  • Thread starter Thread starter friend
  • Start date Start date
hello all,

How to change the colour of  the selectedrow in datagridview ??

thank you..

do it in the paint event.

sample (untested)
'-------------------------
for each orow as datagridviewrow in dg.rows
if orow.selected then
orow.style.backcolor = <desired back color>
orow.style.forecolor = <desired foreground color>
end if
next

hth,
'------------------------------
diego
 
Back
Top