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

7 posts, 0 answers
  1. IKB
    IKB avatar
    24 posts
    Member since:
    Sep 2007

    Posted 16 May 2008 Link to this post

    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
  2. Demon
    Demon avatar
    45 posts
    Member since:
    Sep 2006

    Posted 17 May 2008 Link to this post

    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

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. jdemar
    jdemar avatar
    2 posts
    Member since:
    Jun 2007

    Posted 19 May 2008 Link to this post

    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
  5. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 20 May 2008 Link to this post

    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
  6. IKB
    IKB avatar
    24 posts
    Member since:
    Sep 2007

    Posted 20 May 2008 Link to this post

    Yes, that helps. Filtering is now case insensitive again.
    Thank you.

    Martin
  7. Bob
    Bob avatar
    21 posts
    Member since:
    Mar 2008

    Posted 13 Jun 2008 Link to this post

    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

  8. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Jun 2008 Link to this post

    Hi,

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

    Shinu.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017