change colour of the selectedrow in datagridview

  • Thread starter Thread starter friend
  • Start date Start date
F

friend

hello all,

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

thank you..
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top