Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
240
UltraWingrid nullable date displays 01/01/0001
posted

I reviewed the posts but none of the solution provides the answer.   I have defined a nullable date in my class, but UltraWinGrid continues to display 01/01/0001 despite setting NullText to empty string.    I saw a reference to set Text to empty string but Text is a read only property.

VS2012 SP1 .NET 4, WinGrid 12.1.20121.1001

 Private m_Date As Nullable(Of Date)   (public property for Get)

            .Columns("CommitteeDate").Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Date    
            .Columns("CommitteeDate").Nullable = Nullable.Nothing
            .Columns("CommitteeDate").NullText = ""
            .Columns("CommitteeDate").MinWidth = 70 'issue w/Date type column auto sizing

    Private Sub UltraGrid1_InitializeRow(sender As Object, e As InitializeRowEventArgs) Handles UltraGrid1.InitializeRow
        If CDate(e.Row.Cells("CommitteeDate").Value) = DateTime.MinValue Then
            e.Row.Cells("CommitteeDate").Value = DBNull.Value
        End If
    End Sub

Parents Reply Children
No Data