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
380
Grid Column Formatting
posted

Hello,

     I am using infragistics Grid in my UserControl. In the date Columns depending on the data the Column shows "1899-12-30". In this scenario I do not want to show anything and have the cell Empty.  Is there a way to do this?

   I tried using  InitializeRow event handler to look for any date Values with this date, but if the set the value to nothing the value resets back to 01/01/0001. I am wondering if there is a way to accomplish this in a good way at Column level - like in BeforeColumnFormatting. 

Any help is highly appreciated. Thanks.

-Saravanan.

 

 

Parents
  • 469350
    Offline posted

    Hi Saravanan,

    DateTime fields in DotNot do not allow a value of null because DateTime is a struct. What kind of data source are you using for the grid? If you use a DataSource like a DataTable or UltraDataSource, then these data source will allow you to set a field to null regardless of the underlying data type. That would be the easiest way to do what you want.

Reply Children