This is a migrated thread and some comments may be shown as answers.

Hard to dectect bug in radgrid filterexpressions

0 Answers 21 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Johan
Top achievements
Rank 1
Johan asked on 08 Jun 2018, 05:38 AM

Hello,

 

The bug can best be described as the following:

When setting a radgrid datasource with an IEnumerable, filterexpressions behave not as expected.

 

Reproduce:

Create a radgrid with EnableLinqexpressions set to true, and set its datasource to an IEnumerable. Set a filter on a column. Check the filterexpression that is being generated. Notice the filterexpressions is NOT a valid linqexpression, but has the following format: "([CustomerID] LIKE '%ALFKI%')";

Now set the datasource to a list instead of an IEnumerable. Notice that suddenly the filterexpressions that is generated is different.

 

See also your Filterexpression documentation

 

Issue:

I have a requirement where i have to set an initial filter in a grid when opening the page. But we also have export buttons on that page that use the grids filterexpression to filter a dataset for the export. This no longer worked because the filterexpression was no longer a valid linq expression. In my opinion this behavior is not very intuitive, and i could not find any documentation about it.

 

Regards,

Johan

 

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Johan
Top achievements
Rank 1
Share this question
or