okey! Yeah I did the same thing and it works.. my problem is that in the
place where it doesn't work it's because it's a DataGridComboBox and it
does, or does not other things that are affecting this. That Special Class
that is written to make it possible to add it in a datagrid doesn't keep the
written value, it takes the selected value and use CurrencyManager to put
back that on the row in the datagrid when leaving. The written value is all
gone then.
Don't really know what to do about this! Don't really understand that class
/Lars
"gb" <an*******@discussions.microsoft.com> skrev i meddelandet
news:AC**********************************@microsof t.com...
I added a combobox and set it's DropDownStyle to DropDown and then
populate it using a Datatable in my Dataset. Using DropDown as the
DropDownStyle allows you to enter text and what I typed in did not get
replaced when I tabbed out of the combobox. I then used the Leave event of
the combobox to check to see if what is in the text portion is in the
datatable. Below for example:
Private Sub ComboBox1_Leave(ByVal sender As Object, ByVal e As
System.EventArgs) Handles ComboBox1.Leave If DataSet.Datatable.Select("ColumnName = '" + ComboBox1.Text +
"'").Length = 0 Then 'Item typed is not in datatable
Else
'Item is in datable
End If
End Sub
Hope this helps