OpenAccessDataSource RadGrid TransientProperty Filtering

2 posts, 0 answers
  1. ATeam
    ATeam avatar
    24 posts
    Member since:
    Jan 2010

    Posted 16 Jun 2010 Link to this post


    I have the following application scenario:
    I'm using OpenAccess within a WebApplication where I'm using the Telerik ASP.NET Controls. My problem is, that I want to use the ContextMenuFilter from RadGrid with an Transient Property. With Persistent Properties all works fine but when I want to Filter a transient Property I'm getting the following Exception:
    Unknown type for "NextDateString"; Are you missing a FieldAlias attribute?; String literals must be 'quoted'. 
    Original Query: DEFINE EXTENT xt FOR XXXXXX; SELECT * FROM xt AS this WHERE (NextDateString LIKE '*20.*') ORDER BY Id DESC  

    The real fascinating thing is, that the sorting of the "NextDateString" Column is working only the filtering doesn't work.
    The custom Property is defined in the class XXXXX which is generated from the OpenAccess Reverse Mapping Tool and it is marked with the Transient Attribute, as you see below:
            public string NextDateString 
                    if (this.Nextbegin.HasValue) 
                        return DateUtil.GetNextDateName(this.Nextbegin.Value); 
                        return string.Empty; 

    I know that the filtering from OpenAccess is done on the database, but is there a workaround to include also Transient Fields? Is this an error of my side or is this a feature which is not implemented until now?

    Kind Regards
  2. Serge
    Serge avatar
    375 posts

    Posted 17 Jun 2010 Link to this post

    Hi Dominik Fürst,

     Unfortunately, as you have guessed, the filtering happens on the server side and there is no way to bypass  that. The OpenAccessDataSource is not able to filter the result in memory on the client. 

    Actually there is no way to do this using OpenAccessDataSource, what you can do is disable filtering on this column or implement you own data retrieval method not using the OpenAccesDataSource. You can find more information on this topic in this help article and this example.

    I do hope this helps.

    Best wishes,
    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. DevCraft banner
Back to Top