vb System.Windows.Forms.IDataGridViewEditingControl.EditingControlFormattedValue类(方法)实例源码

下面列出了vb System.Windows.Forms.IDataGridViewEditingControl.EditingControlFormattedValue 类(方法)源码代码实例,从而了解它的用法。

作者:VB.NET开发    项目:System.Windows.Form   
Public Property EditingControlFormattedValue() As Object _
    Implements IDataGridViewEditingControl.EditingControlFormattedValue

    Get
        Return Me.Value.ToShortDateString()
    End Get

    Set(ByVal value As Object)
        Try
            ' This will throw an exception of the string is 
            ' null, empty, or not in the format of a date.
            Me.Value = DateTime.Parse(CStr(value))
        Catch
            ' In the case of an exception, just use the default
            ' value so we're not left with a null value.
            Me.Value = DateTime.Now
        End Try
    End Set

End Property


问题


面经


文章

微信
公众号

扫码关注公众号