vb.net Dateset单元格重载(网上重载修改后结果)

 


#Region "GridView cell重载"

Public Class GridViewCustomCellAIJ02412001
    Inherits DataGridViewTextBoxCell

    Private lisSigTopLine As Boolean = False
    Private lisSigButtomLine As Boolean = False
    Private lisSigLeftLine As Boolean = False
    Private lisSigRightLine As Boolean = False


    Public Sub New(ByVal isSigTopLine_In As Boolean, ByVal isSigButtomLine_In As Boolean, Optional ByVal lisSigLeftLine_In As Boolean = False, Optional ByVal lisSigRightLine_In As Boolean = False)

        lisSigTopLine = isSigTopLine_In
        lisSigButtomLine = isSigButtomLine_In
        lisSigLeftLine = lisSigLeftLine_In
        lisSigRightLine = lisSigRightLine_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

        If lisSigLeftLine = True Then
            borderStylePlaceHolder_In.Left = borderStylePlaceHolder_In.Left
        Else
            borderStylePlaceHolder_In.Left = DataGridViewAdvancedCellBorderStyle.None
        End If

        If lisSigRightLine = True Then
            borderStylePlaceHolder_In.Right = DataGridViewAdvancedCellBorderStyle.None
        Else
            borderStylePlaceHolder_In.Right = borderStyleInput_In.Right
        End If

        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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值