Dynamic Objects Events

  • Thread starter Thread starter Mothi Kannan
  • Start date Start date
M

Mothi Kannan

Hi,
In vb.net
I have created two combo box, dynamically
and filled list in the first combo.

How can I fill the Selected index value of first combo in
to the second combo

The second combo sholud be filled only when the first
combo list item is selected

Thanks

Mothi Kannan
 
Hi,

You have to add a handler for your combobox to catch the
SelectedValueChanged event.

Dim myComboBox as New ComboBox

Me.Controls.Add(myComboBox)

AddHandler myComboBox.SelectedValueChanged, AddressOf
myComboBox_SelectedValueChanged

'Define your own subroutine
Private Sub myComboBox_SelectedValueChanged(ByVal sender as Object, e As
EventArgs)
'Do stuff
End Sub


Hope this will help you

Br

Kristian F. Thomsen
 
Mothi,

This depends very much from what is the datasource or the itemscollection of
the combobox.

How do you set that?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top