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.
Unfortunately, activation email could not send to your email. Please try again.

DateTime format for grid column

Thread ID:

Created:

Updated:

Platform:

Replies:

96231 Aug 30,2010 09:11 PM Sep 2,2010 07:09 AM WPF 3
loading
Tags: GridControl
Valiyaveettil Jitesh Ramanathu
Asked On August 30, 2010 09:11 PM

Hi,

Can I do DateTime format for a grid column? I have a field that is DateTime, and I want to display MONTH YEAR (like in September 2007) format. Is that possible inside the grid?

Thanks,
Jitesh

Muthulakshmi N [Syncfusion]
Replied On August 31, 2010 01:51 AM

Hi Jitesh,

Thank you for your details.

Using below xaml code you can display the month and year of the given Date as your wish.

[xaml code]











We have prepared a sample based on your request. Please download the sample from the below location.

Link:
http://www.syncfusion.com/uploads/redirect.aspx?file=WpfApplication1_9769db29.zip&team=development

Let us know if you need any details.

Regards,
Muthulakshmi

Valiyaveettil Jitesh Ramanathu
Replied On August 31, 2010 03:25 PM

This one worked for me.






gave me the date as SEP 2010, which is what I wanted.

Thanks,
Jitesh

Muthulakshmi N [Syncfusion]
Replied On September 2, 2010 07:09 AM

Hi Jitesh,

Thank you for your details.

We have modified the “GridCellDateTimeEditCellRenderer.cs” file also prepared a sample which illustrates your request. Please download the sample from the below location.

Link:
http://www.syncfusion.com/uploads/redirect.aspx?file=WpfApplication1_61961e3c.zip&team=development


C# code for add new cell type to GridControl:

this.grid.Model.CellModels.Remove("DateTimeEdit ");
datagrid.Model.CellModels.Add("DateTimeEdit", new CustomGridCellDateTimeEditCellModel());

Let us know if you need any details.

Thanks,
Muthulakshmi



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;