DataGridViewCell::AdjustCellBorderStyle Method (DataGridViewAdvancedBorderStyle^, DataGridViewAdvancedBorderStyle^, Boolean, Boolean, Boolean, Boolean)
Modifies the input cell border style according to the specified criteria.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: virtual DataGridViewAdvancedBorderStyle^ AdjustCellBorderStyle( DataGridViewAdvancedBorderStyle^ dataGridViewAdvancedBorderStyleInput, DataGridViewAdvancedBorderStyle^ dataGridViewAdvancedBorderStylePlaceholder, bool singleVerticalBorderAdded, bool singleHorizontalBorderAdded, bool isFirstDisplayedColumn, bool isFirstDisplayedRow )
Parameters
- dataGridViewAdvancedBorderStyleInput
-
Type:
System.Windows.Forms::DataGridViewAdvancedBorderStyle^
A DataGridViewAdvancedBorderStyle that represents the cell border style to modify.
- dataGridViewAdvancedBorderStylePlaceholder
-
Type:
System.Windows.Forms::DataGridViewAdvancedBorderStyle^
A DataGridViewAdvancedBorderStyle that is used to store intermediate changes to the cell border style.
- singleVerticalBorderAdded
-
Type:
System::Boolean
true to add a vertical border to the cell; otherwise, false.
- singleHorizontalBorderAdded
-
Type:
System::Boolean
true to add a horizontal border to the cell; otherwise, false.
- isFirstDisplayedColumn
-
Type:
System::Boolean
true if the hosting cell is in the first visible column; otherwise, false.
- isFirstDisplayedRow
-
Type:
System::Boolean
true if the hosting cell is in the first visible row; otherwise, false.
Return Value
Type: System.Windows.Forms::DataGridViewAdvancedBorderStyle^The modified DataGridViewAdvancedBorderStyle.
The DataGridView control internally calls the AdjustCellBorderStyle method to determine the appearance of the cell borders. The DataGridView control typically uses the value of the AdvancedCellBorderStyle property for the dataGridViewAdvancedBorderStyleInput parameter.
The DataGridViewAdvancedCellBorderStyle::OutsetPartial value is not supported as an input style for cells.
Notes to Inheritors:
Override this method if you want to customize the appearance of the cell borders.
The following code example demonstrates how to override the AdjustCellBorderStyle method to customize the borders of the cells. This code example is part of a larger example provided for the DataGridViewAdvancedBorderStyle class.
Available since 2.0