title: How to set SearchLookUpEdit for DevExpress ComboboxEdit in UserControl from Container control?
body: <p>I have a UserControl that contains DevExpress ComboBoxEdit control with SearchLookUpEdit as an editor set. I have set searchLookUpEditView, and its columns in Designer also.</p>
  
  <p>I want to set UserControl's DataSource, DisplayMember and ValueMember attributes from the container control, but in the runtime i get the error</p>
  
  <pre><code>"Data binding directly to a store query (DbSet, DbQuery, DbSqlQuery) is not supported. Instead populate a DbSet with data, for example by calling Load on the DbSet, and then bind to local data"
  </code></pre>
  
  <p>but if i use this code, to set DataSource for ComboboxEdit that is in the container, not in the UserControl - then everything works fine</p>
  
  <h3> The code from the parent control:</h3>
  
  <pre><code>    //_context is Entity Framework's ObjectContext
      //workUnit1 is UserControl, that contains ComboBoxEdit control
          var mod3 = (from a in _context.Darbi
                      select new { a.ID, a.pieteikuma_Nr, a.Nosaukums, title = a.pieteikuma_Nr + " " + a.Nosaukums });
  
          workUnit1.DataSource = mod3;
          workUnit1.ValueMember = "ID";
          workUnit1.DisplayMember = "title";
  </code></pre>
  
  <h3> The code from the UserControl:</h3>
  
  <pre><code>    [ComplexBindingProperties("DataSource", "DisplayMember")] //UserControl's attributes
      public partial class WorkUnit: UserControl
      {
          //DataBinding parameters from container control
          private object _dSource; //dataSource
          private string _dMember; //displayMember
          private string _vMember; //valueMember
  
          //..//
  
          [AttributeProvider(typeof(IListSource))]
          public object DataSource
          {
              get { return _dSource; }
              set
              {
                  if (value != null)
                  {
                      _dSource = value;
  
                  //workNameCmbBox is ComboBoxEdit control that i need to set SearchLookUpEdit from parent control
                      workNameCmbBox.DataBindings.Add("EditValue", _dSource, "ID");//The error is thrown at this line...
                   }
              }
              public string DisplayMember
              {
                  get { return _dMember; }
                  set
                  {
                      _dMember = value ?? "";//ja null, tad ""
                      workNameCmbBox.Properties.DisplayMember = _dMember;
                  } 
              }
              public string ValueMember
              {
                  get { return _vMember; }
                  set { 
                  _vMember = value ?? ""; //ja null, tad ""
                  workNameCmbBox.Properties.ValueMember = _vMember;
                  }
              }
          }
  </code></pre>
  
  <p>Any suggestions?</p>