Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have setup my dataset & have finished binding a combo box to its values:

....

cboTest.DataSource = dsXref.Tables(0) ' Select CONO, NAME_1 from COMPANY

cboTest.DisplayMember = "NAME_1"

cboTest.ValueMember = "CONO"

....

 

Now, when I drop down the menu of combo box, I get a list of NAME_1 columns as expected.

After user chooses one of the entries, that entry's NAME_1's data is copied into combo box's text property.

Instead I want the CONO (the value member) to be copied into the text property.

How can I do this?

 

 

Additionally, after using an entry from the dropdown menu of combo box (SelectedIndexChanged), I expected the Validating event to fire, but it doesn't. How can I find out the firing sequence of events?

 

 

Thank you,

Omid

Posted

In which event should I do this?

 

I've tried Validating, SelectedIndexChanged, SelectedValueChanged, Validated, & SelectionChangeCommitted. In each instance, I did set the text value of the control & verified it by displaying it using MsgBox. But when the control goes back to the form, I end up with the value from NAME_1 column back in the control's Text.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...