Hard to dectect bug in radgrid filterexpressions

1 posts, 0 answers
  1. Johan
    Johan avatar
    6 posts
    Member since:
    Aug 2017

    Posted 08 Jun 2018 Link to this post



    The bug can best be described as the following:

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



    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



    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.





Back to Top