Re: ComboBox Problem

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Lars Netzel ([stop_spam)
Date: 05/19/04


Date: Wed, 19 May 2004 20:33:39 +0200

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" <anonymous@discussions.microsoft.com> skrev i meddelandet
news:AC2CE8E2-633D-4FD4-A293-DBFC89A76073@microsoft.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



Relevant Pages

  • Re: Sorry but Repost again - Databindings
    ... >From what I can gather, you have a form with a combobox, textboxes, and ... Does the datagrid show the same information as the ... My ComboBox is using the following ... > Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Newbie and 2005 Concurrecny
    ... a combobox and two buttons on a form ... Dim dtName As New DataTable ... Private Sub ComboBox1_SelectedIndexChanged(ByVal sender _ ... I have on my form a Datagrid and also a ComboBox. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Combox Confusion (CJ/Ken I need information to complete this)
    ... his datagrid. ... Private Sub FillGrid() ... Private Sub Button2_Click(ByVal sender As System.Object, ... Inherits ComboBox ...
    (microsoft.public.dotnet.languages.vb)
  • Re: dropdownlistcolumnstyle in a datagridcolumn
    ... This is a datagrid combobox sample based on the syncfusion sample, ... Private Sub FillGrid() ... Private Sub Button2_Click(ByVal sender As System.Object, ...
    (microsoft.public.dotnet.languages.vb)
  • Datagrid and
    ... I have been looking for a adding a combobox dropdown to a ... datagrid, but all of examples are dropdownlist. ... ColumComboBox that will display the first item that begins with the group of ... DropDownStyle = ComboBoxStyle.DropDownList" ...
    (microsoft.public.dotnet.languages.vb)