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

Different style and behaviour of filtering in RadGrid for Q3.2007, Q1.2008 and Q1.2008 SP1

6 Answers 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
IKB
Top achievements
Rank 1
IKB asked on 16 May 2008, 09:56 PM
I created several simple views for some SQL data using the RadGrid Control using the Q3.2007 version 'Prometheus'. When I upgraded the applications to use the SP1 version, I realized two differences:

1. The style of the filter menu changed
2. The filter is now case sensitive

I tried the RTM version of Q1.2008 and noticed that

1. The style of the filter menu was again different (from the other two)
2. The filter is also case sensitive

Screenshots and demo projects are available.

My questions:
1. How do I get the case insensitive filter back for SP1?

The style of the filter menu from Q3.2007 looks much more like Excel Autofilter than the other two versions. It also is much more compact.

2. Why did you change this?
3. Is there an easy way to get the old style back?

Regards

Martin

6 Answers, 1 is accepted

Sort by
0
Demon
Top achievements
Rank 1
answered on 17 May 2008, 05:40 AM
Hi,

The filter menu is now RadMenu, that's why the appearance has changed. If you want the oldschool style, you can make a custom skin for RadMenu or add some custom CSS classes programmatically. ( RadGridID.FilterMenu.something )

http://www.telerik.com/help/aspnet-ajax/menu_appearancecssclassofitems.html

0
jdemar
Top achievements
Rank 1
answered on 20 May 2008, 03:39 AM
I've also confirmed the case-sensitive filtering behavior in version 2008.1.415.20 of the RadGrid.  I've tried binding to a DataTable populated by a MySQL database and to an XPCollection object (using the Express Persistent Object ORM component from DevExpress) also populated by MySQL.  This behavior exists regardless of the collation setting of the source database columns or source database table.

So, I traced the FilterExpression created by the RadGrid.MasterTableView and it would look like:

([job_status] Like '%avail%')

Since the job_status value I want to find is "Available", this FilterExpression results in 0 records.  When I allow the RadGrid to dictate the filtering, it forces a case-sensitive match.

I can set this exact same filter criteria directly on the DataTable or the XPCollection object and the "Available" value is found, proving that neither the DataTable nor the XPCollection are the problem.

I was able to create a workaround as follows:

1) In the RadGrid.ItemCommand event, if the CommandName = RadGrid, FilterCommandName, set a flag in ViewState indicating the need to refresh the filter

2) In the RadGrid.NeedDataSource event, check the flag; if true, set the filter on the DataSource (DataTable, XPCollection, or whatever) to the RadGrid.MasterTableView.FilterExpression; if false, set the DataSource filter to the expression previously stored in ViewState (if any)

3) Also in RadGrid.NeedDatasource, clear the RadGrid.MasterTableView.FilterExpression, set the RadGrid.DataSource to the collection, update the filter expression in ViewState, and clear the refresh filter flag in ViewState.


However... I don't think all of this should be necessary, considering that previous versions performed case-insensitive searches.  In other posts, solutions were given for those using LINQ, but I think there should be a better solution for those using DataTables or ORM tools.  The FilterExpression should not be dictating case-sensitivity.

Please advise on this issue.

Thanks,

John
0
Rosen
Telerik team
answered on 20 May 2008, 11:10 AM
Hi,

Can you please try setting GroupingSettings' CaseSensitive property to false? Please give it a try and see if it helps.

Kind regards,
Rosen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
IKB
Top achievements
Rank 1
answered on 20 May 2008, 07:15 PM
Yes, that helps. Filtering is now case insensitive again.
Thank you.

Martin
0
Bob
Top achievements
Rank 1
answered on 14 Jun 2008, 03:40 AM

I followed your suggestion of setting GroupingSettings CaseSensitive to False but my grid is still case-sensitive.  I am using linqdatasource with VS v3.5.  Can you recommend how I can filter without case-sensitive other than writing a customized filter that converts the query to all lowered?

Regards,

Bob

0
Shinu
Top achievements
Rank 2
answered on 16 Jun 2008, 06:09 AM
Hi,

Go through the following forum link which discuss a similar scenario.
Case Insensitive Filtering

Shinu.
Tags
Grid
Asked by
IKB
Top achievements
Rank 1
Answers by
Demon
Top achievements
Rank 1
jdemar
Top achievements
Rank 1
Rosen
Telerik team
IKB
Top achievements
Rank 1
Bob
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or