Skip to content

Apflkuacha/DataGridFilter

 
 

Repository files navigation

WPF Filterable DataGrid, multi language

datagrid image demo

A custom DataGrid control that inherits from the base DataGrid control class and override some methods to implement filters for each column, like Excel.

Translation of information displayed and formatting of dates in the chosen language.
Languages available: English, French, Russian, German, Italian, Chinese.

The translations are from google translate, if you find any errors or want to add other languages, please let me know.

How to use

  • Add FilterDataGrid.dll as reference in your project

  • Add FilterDatagrid into your xaml :

    • Namespace

      <Window xmlns:control="http://filterdatagrid.control.com/2021" ...
    • Control

      <control:FilterDataGrid 
       FilterLanguage="English" DateFormatString="d" ShowStatusBar="True" ShowElapsedTime="False" ...
      • Properties
        • ShowStatusBar : displays the status bar, default : false
        • ShowElapsedTime : displays the elapsed time of filtering in status bar, default : false
        • DateFormatString : date display format, default : "d"
        • FilterLanguage : translation into available language, default : English

    If you add custom columns, you must set AutoGenerateColumns="False"

    • Custom TextColumn

      <control:FilterDataGrid.Columns>   
          <control:DataGridTextColumn IsColumnFiltered="True" ...
    • Custom TemplateColumn

      FieldName property of DataGridTemplateColumn is required

      <control:FilterDataGrid.Columns>   
          <control:DataGridTemplateColumn IsColumnFiltered="True"
      	                            FieldName="LastName" ...

Benchmark

Intel Core i7, 2.93 GHz, 16 GB, Windows 10, 64 bits.
Tested on the "Last name" column of the demo application using a random distinct name generator, between 5 and 8 letters in length.
The elapsed time decreases based on the number of columns and filtered items.

Number of rows Opening of the PopUp Applying the filter Total (PopUp + Filter)
10 000 < 1 second < 1 second < 1 second
100 000 < 1 second < 1 second < 1 second
500 000 ± 1.5 second ± 1 second ± 2.5 seconds
1 000 000 ± 3 seconds ± 1.5 seconds ± 4.5 seconds

About

WPF Filterable Datagrid, multi language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%