Filling combobox with linq query

2 posts, 0 answers
  1. Cristian
    Cristian  avatar
    46 posts
    Member since:
    May 2011

    Posted 31 May 2011 Link to this post

    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.
  2. Cristian
    Cristian  avatar
    46 posts
    Member since:
    May 2011

    Posted 31 May 2011 Link to this post

    Problem solved I forgot the databind() method at after datasource.
    Thanks anyway
Back to Top