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

Use of semicolon ; in RadGrid Filter

4 Answers 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kai
Top achievements
Rank 2
Kai asked on 10 Oct 2012, 01:42 PM
Hi all,
I've found several threads regarding the usage of semi-colon ; within RadGrid Filter because normally it throws an "Index out of bounds" exception, see e.g.  http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-filter-showing-script-error-when-enter-semicolon-in-search.aspx , http://www.telerik.com/community/forums/aspnet-ajax/grid/filtering-grid-on-character-causes-error.aspx , http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-filter-expression-with-quot-quot-i-e-with-semicolon-is-throwing-index-was-outside-the-bounds-of-the-array.aspx .

The proposed solution is some JavaScript code preventing the input of semi-colon. But of course this does not help if a user (/ hacker?) turned off JavaScript. I'd like to avoid this exception regardless of JavaScript. I also wonder why this problem does not seem to appear on http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx ....?

Is there any other solution?
Many thanks!

4 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 15 Oct 2012, 11:02 AM
Hi,

As you already  verified by yourself on our online demo applications, when you enter a semicolon as a filter value you do not get an exception, just a no records to display message.

However, because the semicolon is used as a substring delimiter, the returned result set might be not accurate. That is why the use of semicolon in the filter text is neither suggested nor supported.

All the best,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Kai
Top achievements
Rank 2
answered on 18 Oct 2012, 02:47 PM
Hi Andrey,
thanks for your reply. Do you have any details how you achieved that no exception is thrown in case of entering a semi-colon? In your example I could enter the semicolon so it's not restricted by JavaScript, nevertheless there is no exception.
Thanks
Kai
0
Accepted
Andrey
Telerik team
answered on 23 Oct 2012, 10:49 AM
Hi,

I have not done anything special to get no exceptions, just the regular case. Most probably the problem on your side comes from some custom code that you are using.

Compare your code with the one in our online demo application and comment out the different parts, then check whether the exception is still raised. Thus you will be able to isolate the issue to a give portion of the code.

All the best,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Kai
Top achievements
Rank 2
answered on 07 Nov 2012, 08:49 AM
Hi Andrey,

thanks for your reply. I've checked locally with the included live examples and there I also get an error message. Probably it's related to our old version 2010.3.1109.40 of Telerik.Web.UI, so upgrading to the latest version might fix the problem.

Thanks!
Kai
Tags
Grid
Asked by
Kai
Top achievements
Rank 2
Answers by
Andrey
Telerik team
Kai
Top achievements
Rank 2
Share this question
or