Ticket Q141539
Visible to All Users

Datetime display and format at GridView data cell

created 16 years ago

I am new user to this product, I tried to create a very simple GridView, data are back from SQL sp, it contains Int, string and datetime format, all fields are display normally except for datetime field, it only shows Date without time, i.e. "1/10/2009" instead of "1/10/2009 10:34:32", I switched to regular GridView (VS 2008), it shows all format correctly.
Since I am not familiar with this product, I only tried few settings but no success. What setting I should use to control the display format?
Thanks for your help in advance,
Tom

Answers

created 16 years ago

Hi Tom,
Set the column's PropertiesDateEdit.DisplayFormat to the "g" value to resolve this issue.
Thanks,
Plato

    Comments (2)

      How to set Column's PropertiesDateEdit.DisplayFormat ?

      Anthony (DevExpress Support) 7 years ago

        Hello Ismail,

        Please check our online demo:

        ASPx
        <dx:GridViewDataDateColumn Caption="Last Updated" FieldName="LastUpdated" Width="120px"> <PropertiesDateEdit DisplayFormatString="HH:mm:ss"> </PropertiesDateEdit> <CellStyle HorizontalAlign="Right" /> </dx:GridViewDataDateColumn>

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.