Radgrid filtering not working with endswith

2 posts, 0 answers
  1. Anup
    Anup avatar
    11 posts
    Member since:
    Mar 2011

    Posted 04 Apr Link to this post

    I have used telerik radgrid in my application. I have data in the form of queryable collection. I have enablelinqexpression set to true.

    So when i use endswith filter i get an expression in the form of : (iif(User == null, "", User).ToString().ToUpper().EndsWith("system".ToUpper()))

    Where user is the column name and system is the string that needs to be searched for.

    I am passing the filter expression to the where condition of my collection as shown : filteredItems.Where(filterExpression);

    My filteredItems collection already have records and also those records that endswith system.

    But it still returns zero count or records.


    The filter expression is working in case of startswith, is not null, is null. But not working for few of the filters like endswith, contains etc.


  2. Eyup
    Eyup avatar
    2941 posts

    Posted 07 Apr Link to this post

    Hi Anup,

    Please make sure that you are not using DataBind() to bind the grid. Performing complex grid operations such as Inserting, Deleting, Updating, Hierarchy relations, Grouping, Exporting, Paging, Sorting, Filtering, etc. require accommodating appropriate database operations.  Therefore, we suggest you to avoid Simple Databinding and strongly recommend the use of more advanced databinding methods, which automatically handle the aforementioned functions:
    Declarative DataSource
    Programmatic Data Binding
    (NeedDataSource event)

    In this sense, you should leave the filtering to the grid. You can also check the third web site from this post:

    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top