Link to home
Start Free TrialLog in
Avatar of Rama Tito
Rama TitoFlag for Malaysia

asked on

How to change border line color.

Hi, Currently by default the border of datagirdview is white. My question are
1) How do i change the entire border color for my datagridview
2) On selected cell i wants the border to be different color.
Avatar of yeelokhk
yeelokhk
Flag of Hong Kong image

1) You can change it by the properties of DataGridView
http://msdn.microsoft.com/en-us/library/ehz9ksfa.aspx

2) Create a event on SelectedIndexChange, in the eventhandler, get the selected cell and use the cell's property to change the style.
http://stackoverflow.com/questions/404651/how-to-get-a-specific-cell-in-a-datagridview-on-selection-changed
Avatar of Rama Tito

ASKER

Hi solution for no.1, manage to solve. No 2, I get the particular cell index, but did not get property to change border colour.
Hi solution for no.1, manage to solve. No 2, I get the particular cell index, but did not get property to change border colour.
Hi solution for no.1, manage to solve. No 2, I get the particular cell index, but did not get property to change border colour.
Hi solution for no.1, manage to solve. No 2, I get the particular cell index, but did not get property to change border colour.
ASKER CERTIFIED SOLUTION
Avatar of yeelokhk
yeelokhk
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It's help me but still i didn't get what i want. I will post a screen shot on new post.