I have a problem using a LookupEdit and have been trying for hours:
How can I display a newly inserted record as a selected item?
I proceed as follows:
- The user writes text to the LookupEdit if the entry does not exist yet
- Call Button_Click-Event of the LookupEdit-Control (I need a plus button to add a new row)
- Write new record in database
- Refill the BindingSource
- Then set LookUpEdit.EditValue = insertedId.
Unfortunately, I always get the value that is most similar to the previously entered one and who was already stored in datatable.
It works perfectly with the ComboBoxEdit control, but then unfortunately I do not get the id of the selected record.
That's why I used a LookupEdit.
Can you help me?