I have a project where i have some dynamically builded DataGrids (winform) that are generated according to some configuration inside some xml files in a directory. In fact, there is one xml for each DataGrid (the file has the same name of the DataGrid) and this xml contains information about DataGrid's columns and database table on which the grid should be binded to.
With the same information above, a panel (for each grid) is generated, and it contains the fields needed to filter each columns.
At moment i have applied to my project the example described at this link : http://www.codeproject.com/Tips/582450/Build-Where-Clause-Dynamically-in-Linq
to dynamically filter my table using a dynamic where (linq) clause onto table datasource (datasource is simply a select all over the underlying table).
What i would achieve is an optimizations, because if there are a lot of data, the db extraction could be expensive. So i would build a dynamic linq to sql where clause instead of a dynamic linq query over a list with all table entry.
How can i do that?
Thanks in advance.