Returning the value of a Datagrid ComboBox

P

Peter W Johnson

Hi Guys,

I have a form setup with a Datagrid. The Datagrid has a combobox in one
column. I am trying to find out the value of the combobox after it has been
changed.

I have added a handler for the SelectIndexChanged event to the TableStyles
Class as follows:-

AddHandler ComboTextCol.ColumnComboBox.SelectedIndexChanged, AddressOf
ItemComboBox_SelectedIndexChanged



The event fires the following:-

Private Sub ItemComboBox_SelectedIndexChanged(ByVal sender As Object, ByVal
e As System.EventArgs)

Dim cbo As NoKeyUpCombo = New NoKeyUpCombo

Dim SelectedIndex As Integer = cbo.SelectedValue

MessageBox.Show("Col is " & DataGrid1.CurrentCell.ColumnNumber _

& ", Row is " & DataGrid1.CurrentCell.RowNumber _

& ", Value is " & cbo.Text)

End Sub



Any ideas on what I need to do?

Cheers

Peter.
 
P

Peter W Johnson

Sorry forgot to say that the message box returns the Row and Col data but no
value!

Cheers

Peter.
 

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

Similar Threads


Top