FilterExpressions with no records

4 posts, 1 answers
  1. Jorge
    Jorge avatar
    53 posts
    Member since:
    Jun 2009

    Posted 01 Jun 2010 Link to this post

    I have RadViewList bound to an ObjectDataSource. If the data source returns no records, filter expressions fail to apply (instead of showing "No data" (EmptyDataTemplate)).

    Is this a bug? If not, this is annoying because when I call Rebind() I have to clear all filters, rebind, check (items.count > 0), and the reapply filters.

    Thanks!
  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 02 Jun 2010 Link to this post

    Hello Jorge,

    I'm afraid that I am unable to observe such behavior, neither using RadFilter nor directly using RadListView filtering API. Please check the attached sample, maybe I'm missing something obvious.

    Kind regards,
    Rosen
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jorge
    Jorge avatar
    53 posts
    Member since:
    Jun 2009

    Posted 02 Jun 2010 Link to this post

    The ObjectDataSource is connected to a Dataset as it is retrieving SQL data. I filter with the following code
                lvRegistros.FilterExpressions.BuildExpression().EqualTo("estado_actual", 1).Build(); 

    where "estado_actual" is a database field (This field must be listed in the DataKeyNames).
    If no records are retrieved, I get

    Invalid property or field - 'estado_actual' for type: Object 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
     
    Exception Details: System.ArgumentException: Invalid property or field - 'estado_actual' for type: Object 
     
    Source Error: 
     
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
     
    Stack Trace: 
     
    [ArgumentException: Invalid property or field - 'estado_actual' for type: Object] 
       Telerik.Web.Data.Expressions.MemberAccessTokenExtensions.CreateMemberAccessExpression(IMemberAccessToken token, Expression instance) +167 
       Telerik.Web.Data.Expressions.ExpressionFactory.MakeMemberAccess(Expression instance, String memberName) +122 
       Telerik.Web.Data.Expressions.ExpressionFactory.MakeMemberAccess(Expression instance, String memberName, Boolean liftMemberAccessToNull) +42 
       Telerik.Web.Data.Expressions.PropertyAccessExpressionBuilder.CreateMemberAccessExpressionOverride() +83 
       Telerik.Web.Data.Expressions.MemberAccessExpressionBuilderBase.CreateMemberAccessExpression() +80 
       Telerik.Web.Data.Expressions.FilterDescriptorExpressionBuilder.CreateMemberExpression() +228 
       Telerik.Web.Data.Expressions.FilterDescriptorExpressionBuilder.CreateBodyExpression() +61 
     

    Thanks!
  5. Answer
    Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 03 Jun 2010 Link to this post

    Hello Jorge,

    Indeed I was able to recreate the error you are getting. However I'm happy to inform you that it was addressed and the fix will be included with the next internal build (available for download next Tuesday). Meanwhile I have updated your telerik point for bringing this to our attention.

    Sincerely yours,
    Rosen
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top