macgile / DataGridFilter

WPF Filterable Datagrid, multi language
MIT License
372 stars 77 forks source link

Filter not working when ItemsSource is of Type DataTable #168

Closed Othmane-Ouazzani closed 2 months ago

Othmane-Ouazzani commented 2 months ago

When ItemsSource is DataTable in the DataGrid , the icons don't even show , i managed to tweek the source code a bit to make the Filter visible , but the ListBox comes empty , it works fine for ObservableCollection , converting from DataTable to ObservableCollection in this case is not a possible solution for me . Hope there's a solution for this , thanks. image

macgile commented 2 months ago

Hi,

You can't use datatable.DefaultView directly, you need to convert it first. See this article : https://www.codeproject.com/Articles/846554/Various-Ways-to-Convert-DataTable-to-List

best regards