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

Filling combobox with linq query

1 Answer 208 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Cristian
Top achievements
Rank 1
Cristian asked on 31 May 2011, 08:01 PM
Hi guys, hope you can help me with this, I have a radcombobox wich i want to fill with data using linq to entities, I 've been trying with this code in the method I use to fill the combo box and set a breakpoint in that, when I run my program the results in the breakpoint appears correctly but when my combo box never gets filled.
Here's the query I implement to fill the combobox
 
private void llenacomboedificio()
       {
           var bdinstedificio = new BD_INSTEntities();
           var query = from edi in bdinstedificio.Inmuebles
                       select edi.nom_inm;
           rdCmbEdificio.DataSource = query.ToList();
       }

Hope your help.

1 Answer, 1 is accepted

Sort by
0
Cristian
Top achievements
Rank 1
answered on 31 May 2011, 08:26 PM
Problem solved I forgot the databind() method at after datasource.
Thanks anyway
Tags
ComboBox
Asked by
Cristian
Top achievements
Rank 1
Answers by
Cristian
Top achievements
Rank 1
Share this question
or