Skip to main content Skip to footer

Changing Filter Format of C1DataGrid DateTimeColumn in WPF


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);

Ruchir Agarwal