I have an array of data views constructed like this where the three data views have already been created.
I'm using this array to assign the data source for combo boxes added at run time. Right now I'm using the array position (DataSourceNbr1 = 0,1,2) stored in my table to assign the data source. DisplayMember1 & ValueMember1 are also stored in my table.
I would like to just use the data view name I have stored in the table to find the correct index (0,1,2) in dvList, but I can't seem to find a way to get the data view name from the array dvList. Is there a way to do this?
Auguy
Sylvania/Toledo Ohio
Code:
dvList(0) = CompanyMasterView
dvList(1) = LeaseTypeView
dvList(2) = GroupView
Code:
PnlCombo.cboBox1.DisplayMember = DisplayMember1
PnlCombo.cboBox1.ValueMember = ValueMember1
PnlCombo.cboBox1.DataSource = dvList(DataSourceNbr1)
Auguy
Sylvania/Toledo Ohio