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

Filter is case-sensitive

10 Answers 148 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex Tushinsky
Top achievements
Rank 2
Alex Tushinsky asked on 25 Nov 2008, 12:07 AM
I'm experiencing a problem with the latest version of RadGrid that I haven't come across before.   I'm using 2008.3.1105.35 RadGrid with SQL Server 2005.  I bind it to a stored procedure using SQLDataSource on the ASPX page (nothing in code-behind).  Whenever I try to filter something, unless I type it exactly as it appears in the grid, I get no results back.

For example, I have column called first name.  In it is sample data such as 'Alex', 'Alexander', and 'Al'.  If I try to filter for 'alex', I get nothing.  If I filter for 'Alex', I get the Alexes back.  Any ideas??

Thank you,
Alex Tushinsky

10 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Nov 2008, 04:17 AM
Hi Alex,

I found the following forum link which discusses  a similar scenario. Try out the suggestions given in the forum discussion and see whether it helps.
Filtering - case insensitive?

Regards
Shinu
0
Alex Tushinsky
Top achievements
Rank 2
answered on 25 Nov 2008, 11:22 PM
<groupingSettings casesensitve="false"> does absolutely nothing.  I'm not surprised either, as I am not grouping anything.   Any other suggestions?

Thank you,
Alex
0
Vlad
Telerik team
answered on 26 Nov 2008, 06:47 AM
Hi Alex,

Can you point us to some of our examples where this can be reproduced?

Best wishes,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Alex Tushinsky
Top achievements
Rank 2
answered on 26 Nov 2008, 12:59 PM
Well, that's just it..  your demos work fine.  However, in my case, without doing anything special, the filtering is case sensitive.

At this point, I've checked that the collation on the database is not set to case-sensitive.  I've been testing the code on my Windows 2008 Server box, and thought that might have something to do with it, but in my production environment, which is Windows 2003, I have the same problem.

I'm going to put together a simple project where this problem exists and send it off to you guys later today.

Thank you,
Alex

0
Alex Tushinsky
Top achievements
Rank 2
answered on 26 Nov 2008, 01:37 PM
I've created a simple project to demonstrate the problem.

You can download it from here: http://www.ltmod.com/temp/NotCaseSensitive.zip

The database used is called testdb, and it is an SQL Server 2005 database backup file, which is in the root folder of the project (testdb.zip).  I've tested the filters using some test data I put into the table, and they are case-sensitive. 

Thanks,
Alex
0
Iana Tsolova
Telerik team
answered on 26 Nov 2008, 04:00 PM
Hello Alex,

Thank you for sending a sample project.

Unfortunately I was not able to restore your database on my end and in order to test the sample. However going through your code I saw that you are not setting the CaseSensitive property to false as it was suggested to you.

Additionally I prepared a sample web site for you where the case insensitive filtering does work as expected. Please try it on your end and let me know how it goes.

Kind regards,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Alex Tushinsky
Top achievements
Rank 2
answered on 26 Nov 2008, 04:16 PM
I tried the sample project you sent, and it too has the same problem.

Please see the screenshots:  http://www.ltmod.com/temp/screen1.png and http://www.ltmod.com/temp/screen2.png

Thanks,
Alex
0
Iana Tsolova
Telerik team
answered on 27 Nov 2008, 06:48 AM
Hi Alex,

Excuse me for misleading you.

I tested the sample with the StartsWith filter function, as you mention it for problematic one, and with the other string specific functions. Please set the EnableLinqExpressions property to false in order to make filtering with the EqualTo filter function case insensitive.
 
Sincerely yours,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Alex Tushinsky
Top achievements
Rank 2
answered on 27 Nov 2008, 03:36 PM
Excellent.  That worked perfectly.

Why is the property "EnableLinqExpressions" though?  Its a bit confusing as I'm not using Linq.  I guess internally, the grid uses Linq, is that right?

Thank you,
Alex
0
Sebastian
Telerik team
answered on 27 Nov 2008, 03:43 PM
Hello Alex,

Yes, by default RadGrid for ASP.NET AJAX built against .NET 3.5 (Telerik.Web.UI v2008.x.xxxx.35) will use LINQ expressions for filtering by default. If you have DataTable or DataView for grid source and will not utilize LINQ, simply switch the default mode by setting the EnableLinqExpressions property of the control to false.

Best regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Alex Tushinsky
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Alex Tushinsky
Top achievements
Rank 2
Vlad
Telerik team
Iana Tsolova
Telerik team
Sebastian
Telerik team
Share this question
or