Home Forums WinForms controls Xceed Grid for WinForms Supressing date values

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #15686 |

    I have a column that displays Dates. Since I want to be able to sort them, the column data type is System.DateTime. The data source, however, allows null values in this column. My grid receives these as ‘zero’ dates, i.e., 1/1/1900. I detect these and want to display blanks but the data type of the column prevents “” as a value.

    Making the Cell.Visible = false removes the grid lines of the cell and leaves one end open.

    For the moment, I am formatting the text to be very small and light colored so it looks like the cell is empty.

    There must be a better / correct way of doing this, right?

    Imported from legacy forums. Posted by rbh (had 1938 views)

    Xceed Support
    Member
    Post count: 5658

    You could simply set those to null (or Nothing) in the Grid and you would get an empty cell.

    e.g.,
    //In C#
    Cell.Value = null;

    ‘In VB.NET
    Cell.Value = Nothing

    Imported from legacy forums. Posted by CharlesB (had 2889 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.