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
460
Formatting DateTime Column
posted

Hello,

 

One of the columns in my grid is bound to a DateTime field in a DataTable object.

If the field has a certain value (for example 1/1/900), I need to display a string with some message that is meaningful to a user. Otherwise, I need to display the field in the MM/yyyy format.

How can I do this? The column needs to be sortable, so creating another field in a DataTable that has proper string representation wouldn't work.

 

Thank you,

Daniel

Parents
No Data
Reply
  • 71886
    Offline posted

    Hello,

    You could see a sample regarding this in our 'Windows Forms Feature Browser'.

    If you have this installed(if you have marked 'Samples' when installing Net Advantage), you could run it from 'Start Menu' -> 'All Programs' -> 'Infragistics' -> 'Windows Forms' -> 'Samples' -> 'Samples (local)'.

    When it loads, please navigate to the 'UX Enhancers' tab = > 'WinExtras' and then 'Launch' the 'WinValidator' sample. Or you can type in the 'Search:' "' WinValidator'". There is a 'Validating WinGrid cells' tab from which you could get the idea.

    Please do not hesitate to contact us if you need any additional assistance.

Children