• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 329
  • Last Modified:

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.
0
Rama Tito
Asked:
Rama Tito
  • 5
  • 2
1 Solution
 
yeelokhkCommented:
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
0
 
Rama TitoProgrammerAuthor Commented:
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.
0
 
Rama TitoProgrammerAuthor Commented:
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.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Rama TitoProgrammerAuthor Commented:
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.
0
 
Rama TitoProgrammerAuthor Commented:
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.
0
 
yeelokhkCommented:
Here is an example from MSDN to adjust individual cell's border
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewadvancedborderstyle.aspx
0
 
Rama TitoProgrammerAuthor Commented:
It's help me but still i didn't get what i want. I will post a screen shot on new post.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now