-
January 12th, 2021, 06:21 AM
#1
Using datagridview AdjustCellBorderStyle function to change border color
Hello everyone.
I'm having a hard time trying to do anything with the dataGridView border. Id like to chang its color and shape of a two different cells using Visual c++ and making a Windows form application.
Code:
DataGridViewAdvancedBorderStyle^ dgv1ph;
DataGridViewAdvancedBorderStyle^ dgv1i;
dgv1ph->Right = DataGridViewAdvancedCellBorderStyle::OutsetDouble;
this->dataGridView1->Rows[1]->Cells[1]->AdjustCellBorderStyle(dgv1ph, dgv1ph,true, true,true, true);
this->dataGridView1->Rows[3]->Cells[3]->AdjustCellBorderStyle(dgv1ph, dgv1ph,true, true,true, true);
This code above in principle should hange the right border of the cells 1,1 and 3,3 but as it do compile, a i try to run that part of the code the application breaks with system null reference exception.
-
January 12th, 2021, 06:48 AM
#2
Re: Using datagridview AdjustCellBorderStyle function to change border color
The code you have posted has nothing to do with the native C++.
It looks like the managed code.
So I move this thread to the most appropriate Forum.
Victor Nijegorodov
-
January 12th, 2021, 06:49 AM
#3
Re: Using datagridview AdjustCellBorderStyle function to change border color
[moved from Visual C++ Programming Forum]
Victor Nijegorodov
-
January 12th, 2021, 07:36 AM
#4
Re: Using datagridview AdjustCellBorderStyle function to change border color
Sorry, there were almost no posts here so i assumed its not the propper place
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|