How to change border line color.

Hi, by further referring to ID: 27375157. What i looking forward are shown in screencast below. I trying to create in datagridview.
      
TITO2009-508594.flv
Rama TitoProgrammerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill NolanOwner, Lead Technology ProgrammerCommented:
?
0
Rama TitoProgrammerAuthor Commented:
Hi, Currently by default the border of datagirdview is white. I wanted the selected cell i wants the border to be different color.
0
MajorBigDealCommented:
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Rama TitoProgrammerAuthor Commented:
Hi, I did browse the site but to change the border line color, I did get it how? please do assist.
0
MajorBigDealCommented:
I am at a remote site that only has visual studio 2005 so unfortunately I can't write my own example for you at this time. But  here are some examples. If you try it and get stuck, just ask a specific question about the part you are stuck on and I'll try to help you.

Are you using C#? Here is an example of deriving a CustomDataGridView from the DataGridView.  Then in your CustomDataGridView you override the DataGridViewAdvancedBorderStyle which allows you to customize the cells borders.  Then when you instantiate your CustomDataGridView you are able to control the borders.

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewadvancedborderstyle(v=vs.90).aspx

0
Rama TitoProgrammerAuthor Commented:
Hi, I didn't see any option for increase the border thickness and colors to the border cells. Please do advice.
public class DataGridViewCustomCell : DataGridViewTextBoxCell
    {
        public override DataGridViewAdvancedBorderStyle AdjustCellBorderStyle(
            DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStyleInput,
            DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStylePlaceHolder,
            bool singleVerticalBorderAdded,
            bool singleHorizontalBorderAdded,
            bool firstVisibleColumn,
            bool firstVisibleRow)
        {
            // Customize the top border of cells in the first row and the 
            // right border of cells in the first column. Use the input style 
            // for all other borders.
            dataGridViewAdvancedBorderStylePlaceHolder.Left = firstVisibleColumn ?
                DataGridViewAdvancedCellBorderStyle.OutsetDouble :
                DataGridViewAdvancedCellBorderStyle.None  ;
                
                
            dataGridViewAdvancedBorderStylePlaceHolder.Top = firstVisibleRow ?
                DataGridViewAdvancedCellBorderStyle.OutsetDouble :
                DataGridViewAdvancedCellBorderStyle.None  ;

            dataGridViewAdvancedBorderStylePlaceHolder.Right =
                dataGridViewAdvancedBorderStyleInput.Right;
            dataGridViewAdvancedBorderStylePlaceHolder.Bottom =
                dataGridViewAdvancedBorderStyleInput.Bottom;
           
            
            return dataGridViewAdvancedBorderStylePlaceHolder;
        }
    }

Open in new window

0
MajorBigDealCommented:
After further research I think you might be right.  I was looking at  DataGridViewAdvancedBorderStyle not DataGridViewAdvancedCellBorderStyle and I am not in a position to try it myself.  This might not be doable without developing a custom control and painting it yourself, which is a lot of work.  But I'm not really sure.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rama TitoProgrammerAuthor Commented:
I will keep on try with custom control and painting. If you come cross any link related to this please do post. Cheers
0
Rama TitoProgrammerAuthor Commented:
Hi, I did work around and managed. But not so sure about it.

My cell ( row height & column width are 62 )
DG1.DefaultCellStyle.SelectionBackColor = Color.GreenYellow  ;

Then on the Edit column in my DG1, i did Columntype =  Datagridviewimagecolumn
I did inset a white image image (57X57)

Sorry about the screen shot, actually it works accordingly
TITO2009-509091.flv
0
MajorBigDealCommented:
Very cool - glad you got it working!
0
Rama TitoProgrammerAuthor Commented:
Thanks for giving the starting points
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.