Duplicating Components in Visual basic .NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I want to Duplicate an user control or a combobox for multiple number of times in my form

i.e
a combobox will be populated only once and then by creating each object should contain the data's which is already populated, I have created the shared contructor for populating the combobox even after this the functionality doesn't works properl

With Best regard
Jothi Mages
 
H

You can try like this

1. Create a Datasource for ComboBox. (This should be a form level declaration
2. Set the Datasource of the Combobox. this will populate the Combobx
3. The code you are using to create multiple combobox should also set the datasource property of the combobox object. (using the above mentioned variable

Regard

Sooraj
 
Hi Sooraj

thnks for ur Ide

but Idea which u have Posted will only work for ComboBox but when i want to duplicate any other component such as an user control or a simple butto

what i am looking for is to mulitiply or duplicate components in my form so that i dont want to maintain an datasource and no need to add data's into it

thanks and best Regard
Jothi Mages

----- Sooraj PM wrote: ----

H

You can try like this

1. Create a Datasource for ComboBox. (This should be a form level declaration
2. Set the Datasource of the Combobox. this will populate the Combobx
3. The code you are using to create multiple combobox should also set the datasource property of the combobox object. (using the above mentioned variable

Regard

Sooraj
 
Back
Top