C#devexpress Gridcontrol the display format setting of the Date Line (graphic)

Source: Internet
Author: User
This article mainly describes the C # DevExpress Gridcontrol Date Line display format settings, the need for friends can refer to the following

As shown, the date is displayed as "MM DD Day", or in other formats, such as displaying the year, month, day, or date with time, set as follows:

1, if set, date is D, time is T:

2, in the event of the following wording:

private void Bandedgridview1_customcolumndisplaytext (object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)    {      //date display format      PQF31. displayformat.formatstring = "MM month DD Day";      PQF31. displayformat.formatstring = "Yy-mm-dd tt:hh";    }

Set DevExpress Gridcontrol control Time column display hours, minutes, seconds style

Title, if the dev Gridcontrol control is bound to a DataTable data source, when a column in the DataTable is of type date, the default display style of Gridcontrol displays only the current date and does not display the time, minute, and second.

Solution:

Set the display style,

Setup is complete, display the results show,

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.