Combobox runtime binding
-
- Posts: 17
- Joined: Wed Nov 14, 2012 1:39 pm
Combobox runtime binding
I'm trying to bind a combobox to a datasource at runtime in a dialog form.
1) I prepared the datasource (with a @needle param)
2) I added to a new dialog form a textbox, a combo and a button
3) I set the datasource to NOT connect on start and I binded it to combo
4) I start writing in the text, then press the button (to start the search)
5) on click method I get the text from textbox, set the parameter value and connect the datasource
the combobox is NOT getting the filtered value from its binding... how to force/refresh the binding?
1) I prepared the datasource (with a @needle param)
2) I added to a new dialog form a textbox, a combo and a button
3) I set the datasource to NOT connect on start and I binded it to combo
4) I start writing in the text, then press the button (to start the search)
5) on click method I get the text from textbox, set the parameter value and connect the datasource
the combobox is NOT getting the filtered value from its binding... how to force/refresh the binding?
Re: Combobox runtime binding
Hello,
Please send us your report with test data for analysis.
Thank you.
Please send us your report with test data for analysis.
Thank you.
-
- Posts: 17
- Joined: Wed Nov 14, 2012 1:39 pm
Re: Combobox runtime binding
It's really simple, you can bind it to any test table with ID/Name...
- Attachments
-
- TestReport.zip
- (2.1 KiB) Downloaded 146 times
Re: Combobox runtime binding
Hello,
Please try to add each item in combobox:
Please try to add each item in combobox:
Code: Select all
Products.Parameters["@p1"].ParameterValue = TextBoxControl1.Text;
Products.Connect(); ;
this.ComboBoxControl1.Control.Items.Clear();
foreach (DataRow row in Products.DataTable.Rows)
{
this.ComboBoxControl1.Control.Items.Add(row["ProductName"]);
}
-
- Posts: 17
- Joined: Wed Nov 14, 2012 1:39 pm
Re: Combobox runtime binding
ok, I will remove the bindings and try with this approach...
thanks
thanks
Re: Combobox runtime binding
Hello,
This would be great if you send us information about the result.
Thank you.
This would be great if you send us information about the result.
Thank you.