Code-databinded combo dropdown issue

2 posts, 0 answers
  1. Jorge Pascual
    Jorge Pascual avatar
    3 posts
    Member since:
    Jul 2009

    Posted 19 Nov 2009 Link to this post

    Hello

    I'm populating a radcombobox control programatically with the code shown below. I know combo is filled with all the items it must, (i can test this using items.count or selecteditem properties), but the fact is that when I click the dropdown arrow, the combo doesn't dropdown, just stays as a single textbox showing only the current item.

    This is the code sample:
     

     

     

     

    Public Sub CargarMarcas(ByRef cmbMarcas As Telerik.WinControls.UI.RadComboBox)  
                Using ta As New ArqBD.dsERPConfigTableAdapters.MARCASTableAdapter  
                    Using dt As New ArqBD.dsERPConfig.MARCASDataTable  
                        ta.Fill(dt)  
                        cmbMarcas.DisplayMember = "Nombre" 
                        cmbMarcas.ValueMember = "Identificador" 
                        cmbMarcas.DataSource = dt  
                    End Using  
                End Using  
            End Sub 
     
       


    Note: I've tried the same code in form's load event and in a separate public module (as the sample), and in both cases it doesn't work. Is there something I'm missing? Thank you in advance

     

     

     

     

     

  2. Jorge Pascual
    Jorge Pascual avatar
    3 posts
    Member since:
    Jul 2009

    Posted 19 Nov 2009 Link to this post

    SOLVED!!!!

    With Using...End Using the combobox lost its items when the dataset is disposed.
    With dim the problem is solved.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top