This is a migrated thread and some comments may be shown as answers.

Code-databinded combo dropdown issue

1 Answer 57 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jorge Pascual
Top achievements
Rank 1
Jorge Pascual asked on 19 Nov 2009, 11:48 AM
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

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Jorge Pascual
Top achievements
Rank 1
answered on 19 Nov 2009, 02:32 PM
SOLVED!!!!

With Using...End Using the combobox lost its items when the dataset is disposed.
With dim the problem is solved.
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
Jorge Pascual
Top achievements
Rank 1
Answers by
Jorge Pascual
Top achievements
Rank 1
Share this question
or