populating combo box from code
Posted: Thu Apr 15, 2010 8:21 am
Hi,
I have a combo box on an options form contained in the report. I can set the (Data Bindings) Items property and the combo box loads fine when loading. What I need to do is load the combo box from code after the form is displayed, I've tried using: this.cboEmployee.ItemsBinding = "CompanyEmployee.Employee_Name"; where CompanyEmployee is a datasource and Employee_Name is a field in that datasource, but it does nothing. Is there a DataBind or DataRefresh function I should be calling? How do I do this?
Thanks,
Scot
I have a combo box on an options form contained in the report. I can set the (Data Bindings) Items property and the combo box loads fine when loading. What I need to do is load the combo box from code after the form is displayed, I've tried using: this.cboEmployee.ItemsBinding = "CompanyEmployee.Employee_Name"; where CompanyEmployee is a datasource and Employee_Name is a field in that datasource, but it does nothing. Is there a DataBind or DataRefresh function I should be calling? How do I do this?
Thanks,
Scot