16,555
社区成员
发帖
与我相关
我的任务
分享
dgdShoninData.Rows(1).Cells(1) = _
New GridViewCustomCellAIJ02412001(False, False)
Public Class GridViewCustomCellAIJ02412001
Inherits DataGridViewTextBoxCell
Private lisSigTopLine As Boolean = False
Private lisSigButtomLine As Boolean = False
Public Sub New( _
ByVal isSigTopLine_In As Boolean, _
ByVal isSigButtomLine_In As Boolean)
lisSigTopLine = isSigTopLine_In
lisSigButtomLine = isSigButtomLine_In
End Sub
Public Overrides Function AdjustCellBorderStyle( _
ByVal borderStyleInput_In As DataGridViewAdvancedBorderStyle, _
ByVal borderStylePlaceHolder_In As DataGridViewAdvancedBorderStyle, _
ByVal verticalBorderAdded_In As Boolean, _
ByVal horizontalBorderAdded_In As Boolean, _
ByVal firstVisibleColumn_In As Boolean, _
ByVal firstVisibleRow_In As Boolean _
) As DataGridViewAdvancedBorderStyle
borderStylePlaceHolder_In.Left = DataGridViewAdvancedCellBorderStyle.None
borderStylePlaceHolder_In.Right = borderStyleInput_In.Right
If lisSigTopLine = True Then
borderStylePlaceHolder_In.Top = _
borderStyleInput_In.Top
Else
borderStylePlaceHolder_In.Top = _
DataGridViewAdvancedCellBorderStyle.None
End If
If lisSigButtomLine = True Then
borderStylePlaceHolder_In.Bottom = _
borderStyleInput_In.Bottom
Else
borderStylePlaceHolder_In.Bottom = _
DataGridViewAdvancedCellBorderStyle.None
End If
Return borderStylePlaceHolder_In
End Function
End Class