Ticket Q414624
Visible to All Users

DataSourceCriteria problem

created 13 years ago

Hello support,

again, I got a problem with formulating a datasourcecriteria for the following:

C#
class State { public string Name { ... } } class StateTransition { public State FromState { ... } public State ToState { ... } }

I show a DetailView for class StateTransition. FromState has a value assigned. For ToState, I must formulate a datasourcecriteria so that I get all States except the one that is assigned to FromState.

Can you help me?

Thank you,
Markus

My BO (StateTransition) has two references to the same other BO (State). The according properties are FromState and ToState.

Answers

created 13 years ago (modified 13 years ago)

Hi Markus,
Please use the Current Object Parameter to construct proper criteria.

C#
class StateTransition { [DataSourceCriteria("'@This.ToState' is null or not '@This.ToState.Oid'=Oid")] public State FromState { ... } [DataSourceCriteria("'@This.FromState' is null or not '@This.FromState.Oid'=Oid")] public State ToState { ... } }

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.