Hi George,
Regret for the inconvenience caused.
If you want to display the filter options in the chronical order with the given format, you can use the custom filter control and use the DrawItem event of the CheckedListBox to customize the display text as per your requirement. Please refer to the following code snippet and sample,
Code Snippet:
this.sfDataGrid1.FilterPopupShowing += sfDataGrid1_FilterPopupShowing;
void sfDataGrid1_FilterPopupShowing(object sender, Syncfusion.WinForms.DataGrid.Events.FilterPopupShowingEventArgs e)
{
var customFilterControl = new CustomFilterControl();
customFilterControl.Column = e.Column;
if (!(e.Control is CustomFilterControl))
{
e.Cancel = true;
customFilterControl.Show(this.sfDataGrid1.TableControl, e.Location);
}
}
public class CustomFilterControl : DataGridFilterControl
{
bool itemDrawingWired = false;
protected override void SetCheckedListBox(Control control, System.Drawing.Point location, System.Drawing.Size size)
{
base.SetCheckedListBox(control, location, size);
if(this.CheckListBox != null && !itemDrawingWired)
{
this.CheckListBox.DrawItem += CheckListBox_DrawItem;
itemDrawingWired = true;
}
}
void CheckListBox_DrawItem(object sender, Syncfusion.WinForms.ListView.Events.DrawItemEventArgs e)
{
if (e.ItemType == Syncfusion.WinForms.ListView.Enums.ItemType.SelectAllItem)
return;
if (this.Column is GridDateTimeColumn)
{
DateTime date;
if (DateTime.TryParse(e.Text, out date))
e.Text = date.ToString("MM/dd/yyyy");
}
}
} |
Before checking the solution, Please install the following patch in your version 17.1.0.47 and patch for the fix can be downloaded from the following location.
Recommended approach - exe will perform automatic configuration
Please find the patch setup from below location:
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from below location:
Assembly Version: 17.1.0.47
Installation Directions : This patch should replace the files “SfListView.WinForms” under the following folder.
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\[TargetFramework]
Example : $system drive:\Program Files\Syncfusion\Essential Studio\17.1.0.47\precompiledassemblies\17.1.0.47\4.0
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.
Note :
To change how you receive bug fixes, ask your license management portal admin to change your project’s patch delivery mode.
Disclaimer :
Please note that we have created this patch for version 17.1.0.47 specifically to resolve the issue reported in this Forum 145425.
If you have received other patches for the same version for other products, please apply all patches in the order received.
The fix for this issue will be included in our upcoming 2019 Volume 2 SP1 release which is expected to be rolled out in the end of July, 2019.
Regards,
Adhi