Can't find what you're looking for?

Contact us or post in our forums and we'll help you find an answer.

Changing Filter Format of C1DataGrid DateTimeColumn in WPF

Background:

A brief explanation on how to change the filter format of a C1DataGrid DateTimeColumn in WPF.

Steps to Complete:

All ComponentOne control honour FrameworkElement.Language which is by default “en-US”, hence filter gives US date formats. So, to show custom filter format, we need to make application culture aware

//set thread culture
Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture =
new CultureInfo("en-GB");

//set language according to the current culture used in OS
this.Language = System.Windows.Markup.XmlLanguage.GetLanguage( Thread.CurrentThread.CurrentCulture.Name);

Get the Latest Version of WPF Edition
Download the Free Trial Now