Hi!
I have issue with filter radGrid, when data in filter field contains double quotes ("). For example: <"Telerik" company>. In this case there is no filter action, and filter field cleaning after pressing on filter button.
This issue exist in online filter demo: http://demos.telerik.com/aspnet-ajax/Grid/Examples/GeneralFeatures/Filtering/DefaultCS.aspx
Try type in filter field some text with double quote and apply filter action. No filter will be apply and filter field will be clear.
There is workaround or fix for this issue?
Thank you.
P.S. Sorry for my English.
I have issue with filter radGrid, when data in filter field contains double quotes ("). For example: <"Telerik" company>. In this case there is no filter action, and filter field cleaning after pressing on filter button.
This issue exist in online filter demo: http://demos.telerik.com/aspnet-ajax/Grid/Examples/GeneralFeatures/Filtering/DefaultCS.aspx
Try type in filter field some text with double quote and apply filter action. No filter will be apply and filter field will be clear.
There is workaround or fix for this issue?
Thank you.
P.S. Sorry for my English.
8 Answers, 1 is accepted
0
Hello Nikolay,
Please note that filtering with quotes ( " ) is not supported for our RadGrid control.
Excuse us for any inconvenience caused.
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Please note that filtering with quotes ( " ) is not supported for our RadGrid control.
Excuse us for any inconvenience caused.
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Nikolay
Top achievements
Rank 1
answered on 15 Jan 2009, 10:09 AM
Hello!
There is no plans for adding this functional in new versions of RadGrid?
It is strange restriction. There is many case when data contains quotes (for example, customers names), and user need to filter this data.
Thank you very much!
There is no plans for adding this functional in new versions of RadGrid?
It is strange restriction. There is many case when data contains quotes (for example, customers names), and user need to filter this data.
Thank you very much!
0
Hello Nikolay,
Thank you for your feedback.
I would like to inform you that we don't have many similar requests so far. Nevertheless I added your suggestion in our product backlog for future consideration by our developers.
Please let us know if you need further assistance.
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Thank you for your feedback.
I would like to inform you that we don't have many similar requests so far. Nevertheless I added your suggestion in our product backlog for future consideration by our developers.
Please let us know if you need further assistance.
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Amit
Top achievements
Rank 1
answered on 02 Nov 2009, 06:15 AM
Hi Daniel,
Are you sure double quotes as mentioned below are not supported in rad grid, because they work perfectly for me :-).
But problem is there with single quotes.Root cause of this is when comparing the values in filters we put value in single quotes:
([<column value>] like '% <Filter value> %')
This is done while setting FilterExpression property.
Is there a way so that we can use any encoding technique within C# code while setting this property.
Are you sure double quotes as mentioned below are not supported in rad grid, because they work perfectly for me :-).
But problem is there with single quotes.Root cause of this is when comparing the values in filters we put value in single quotes:
([<column value>] like '% <Filter value> %')
This is done while setting FilterExpression property.
Is there a way so that we can use any encoding technique within C# code while setting this property.
0
Hello Amit,
Single quotes should be escaped with another single quote:
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Single quotes should be escaped with another single quote:
RadGrid1.MasterTableView.FilterExpression =
"([asdf] like '%''3%')"
;
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0

Marie
Top achievements
Rank 1
answered on 18 Nov 2014, 07:53 PM
I was having the same problem with single quotes...
I tried to replace ' by \' but nothing, the filter is not filtering, and no error... simply not filtering
if (value.Contains(" ' "))
value = value.Replace(" ' ", " \' ");
filterExpression = "([brand2_itg] = ' " + value + " ')";
I tried to replace ' by \' but nothing, the filter is not filtering, and no error... simply not filtering
if (value.Contains(" ' "))
value = value.Replace(" ' ", " \' ");
filterExpression = "([brand2_itg] = ' " + value + " ')";
0

Marie
Top achievements
Rank 1
answered on 18 Nov 2014, 08:13 PM
I get it!
We replace the single quote by two single quotes, and that's all!
if (value.Contains("'")) // If value contiens a single quote
value = value.Replace("'", "''"); // replace the single quote by TWO single quotes, not a double quote
filterExpression = "([columnToFilter] = '" + value + "')";
We replace the single quote by two single quotes, and that's all!
if (value.Contains("'")) // If value contiens a single quote
value = value.Replace("'", "''"); // replace the single quote by TWO single quotes, not a double quote
filterExpression = "([columnToFilter] = '" + value + "')";
0

Surbhi
Top achievements
Rank 1
answered on 28 May 2015, 01:25 PM
For me RadGrid.MasterTableView.FilterExpression is not detecting values with "" (e.g. "cow"). I tried adding GridFilterFunction.IllegalStrings = new string[] { " LIKE ", " AND ", " OR ", " NULL ", " IS " }; in my page_load event, now FilterExpression detects " but like ""cow"" and hence throws an exception. I even tried splitting extra " but that's not working out. Please help me with this. Thanks in advance.