We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to format DataTime Column in GDBG?

I set MaskEditGridStyle for DateTime Column in GDBG.The value of this column is null, will be showed : "//". But I want it will be showed : "00/00/0000". How can I do that ?

3 Replies

AD Administrator Syncfusion Team January 29, 2005 06:15 AM UTC

Try setting this.gridDataBoundGrid1.Binder.InternalColumns["Col1"].StyleInfo.MaskEdit.PaddingCharacter = ''0'';

DB David Bosak February 1, 2005 12:24 AM UTC

>Try setting > >this.gridDataBoundGrid1.Binder.InternalColumns["Col1"].StyleInfo.MaskEdit.PaddingCharacter = ''0''; > If use this way, data which is showed in GDBG is wrong. If you have ''1/2/2002'' in database and the grid will be showed ''10/20/2002''. Help me this problem. Thanks

AD Administrator Syncfusion Team February 1, 2005 06:30 AM UTC

I do not know how you will get the behavior you want using a MaskEdit cell. You can handle 2-3 events and probably get the exact behavior you want as in the sample below, or you can use a DateTime column so your user has a dropdown cell but will not get the typing feel of a MaskEdit cell. http://www.syncfusion.com/forums/Uploads/GGC_Forum_Date.zip

Live Chat Icon For mobile
Up arrow icon