Hello,

it's my first message on this forum.
I use VS2010, W7, FirebirdSql.Data.FirebirdClient 2.7.7.0 and Firebird 2.5.
Here is my problem.

I have a Form and a select query that executes in the form load event.
The Form has many TabPages and one Tabpages has onr or many FlowLayoutPanel and every FlowLayoutPanel are the parent of one single ComboBoX. The count of FlowLayoutPanel is the count of Rows returning by the select query.


I want make a databinding betweeen the ComboBoX and every Rows. No problem when the form loads but when I click on the Tabpage that is FlowLayoutPanel parent. I raise ArgumentException :« Impossible databinding between property or column name XXX. Parameter Name DataMember » But The DataMember is right and the exception is not raised by XXXX.cs file *but by the Main() method*. Here is the code snippet XXXX.cs file


for
(int i = 0; i<  nbRowTjMedecinPatient ; i++)

   {
   foreach
   (Control ctrl in flpMedecin.Controls[i].Controls)

   {if
   (ctrl is ComboBox)

       {ComboBox
       cb = (ComboBox)ctrl;
       cb.DataBindings.Add("SelectedValue",
       tblTjMedecinPatient.Rows[i], "clemed");

   }
   }

}

Here is the exception code

à System.Windows.Forms.BindToObject.CheckBinding()
à System.Windows.Forms.BindToObject.SetBindingManagerBase(BindingManagerBase lManager) à System.Windows.Forms.Binding.SetListManager(BindingManagerBase bindingManagerBase) à System.Windows.Forms.ListManagerBindingsCollection.AddCore(Binding dataBinding)
à System.Windows.Forms.BindingsCollection.Add(Binding binding)
à System.Windows.Forms.BindingContext.UpdateBinding(BindingContext newBindingContext, Binding binding)
à System.Windows.Forms.Control.UpdateBindings()
à System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
à System.Windows.Forms.ListControl.OnBindingContextChanged(EventArgs e)
à System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
à System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
à System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
à System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
à System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
à System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
à System.Windows.Forms.Control.CreateControl()
à System.Windows.Forms.Control.SetVisibleCore(Boolean value)
à System.Windows.Forms.Control.set_Visible(Boolean value)
à System.Windows.Forms.TabPage.set_Visible(Boolean value)
à System.Windows.Forms.TabControl.UpdateTabSelection(Boolean updateFocus)
à System.Windows.Forms.TabControl.OnSelectedIndexChanged(EventArgs e)
à System.Windows.Forms.TabControl.WmSelChange()
à System.Windows.Forms.TabControl.WndProc(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Any help will be really great for me. Sorry for my English


Xavier

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to