title: How to make DataSourceCriteria dependent to a property in XAF?
body: <p>I use the eXpressApp Framework to develop a windows application. I want to filter a lookup view property editor depending on an enum property in my class. </p>
  
  <p>this is my code:</p>
  
  <p>Category Class:</p>
  
  <pre><code>    private TranType tranType;
      public TranType TranType
      {
          get
          {
              return tranType;
          }
          set
          {
              SetPropertyValue("TranType", ref tranType, value);
          }
      }
  
      private string categoryName;
      public string CategoryName
      {
          get
          {
              return categoryName;
          }
          set
          {
              SetPropertyValue("CategoryName", ref categoryName, value);
          }
      }
  
      private Category parentCategory;
      public Category ParentCategory
      {
          get
          {
              return parentCategory;
          }
          set
          {
              SetPropertyValue("ParentCategory", ref parentCategory, value);
          }
      }
  </code></pre>
  
  <p>Tran Class:</p>
  
  <pre><code>    private Category category;
      [DataSourceCriteria("TranType == TranType")]
      public Category Category
      {
          get
          {
              return category;
          }
          set
          {
              SetPropertyValue("Category", ref category, value);
          }
      }
  
      private static TranType myTranType;
      [ImmediatePostData]
      public TranType MyTranType
      {
          get
          {
              return myTranType;
          }
          set
          {
              SetPropertyValue("MyTranType", ref myTranType, value);
          }
      }
  </code></pre>
  
  <p>Each <code>Category</code> has a <code>TranType</code> and I want when the user chooses for example <code>TranType=Expense</code>, the categories filtered in the lookup based on their given <code>TranType</code>.</p>
  
  <p>Thank You for help.</p>