There appears to be a bug with the AutoFilter logic when EnableLinqExpressions is set to true.
Lets say I have a string column called "PartnerName", defined as follows:
Lets say the user wants to locate a partner whose name starts with "Briar's". They enter this text in the filter column, and hit enter.
On the back end, the filter expression is defined within the grid.MasterTableView.FilterExpression is set to:
(iif(PartnerName == null, "", PartnerName).ToString().ToUpper().Contains("briar''s".ToUpper()))
Notice that the grid has replaced the single quote in Briar's with two single quotes. While this logic makes sense if we're sending the filter expression back to a database directly, it does not make sense when used as part of a Dynamic Linq statement, and in fact results in the query not returning any values..
There doesn't seem to be any way to work around this bug at the moment, short of some invasive string manipulation. Is there a way to force the grid to not replace the single quote with two single quotes?
Roy
Lets say I have a string column called "PartnerName", defined as follows:
<
telerik:GridBoundColumn DataField="PartnerName" DataType="System.String" HeaderText="Name"
SortExpression="PartnerName" UniqueName="PartnerName" CurrentFilterFunction="Contains"
ShowFilterIcon="false" AutoPostBackOnFilter="true" />
Lets say the user wants to locate a partner whose name starts with "Briar's". They enter this text in the filter column, and hit enter.
On the back end, the filter expression is defined within the grid.MasterTableView.FilterExpression is set to:
(iif(PartnerName == null, "", PartnerName).ToString().ToUpper().Contains("briar''s".ToUpper()))
Notice that the grid has replaced the single quote in Briar's with two single quotes. While this logic makes sense if we're sending the filter expression back to a database directly, it does not make sense when used as part of a Dynamic Linq statement, and in fact results in the query not returning any values..
There doesn't seem to be any way to work around this bug at the moment, short of some invasive string manipulation. Is there a way to force the grid to not replace the single quote with two single quotes?
Roy