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

OpenAccessDataSource RadGrid TransientProperty Filtering

1 Answer 83 Views
Integration with other products
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ATeam
Top achievements
Rank 1
ATeam asked on 16 Jun 2010, 08:58 AM
Hello,

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:
        [Transient] 
        //[FieldAlias("nextbegin")] 
        public string NextDateString 
        { 
            get 
            { 
                if (this.Nextbegin.HasValue) 
                { 
                    return DateUtil.GetNextDateName(this.Nextbegin.Value); 
                } 
                else 
                { 
                    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
Dom

1 Answer, 1 is accepted

Sort by
0
Serge
Telerik team
answered on 17 Jun 2010, 06:36 PM
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,
Serge
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
Tags
Integration with other products
Asked by
ATeam
Top achievements
Rank 1
Answers by
Serge
Telerik team
Share this question
or