Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Combo Box

Combo Box

Scheduled Pinned Locked Moved C#
databasevisual-studiohelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DJCRIS12
    wrote on last edited by
    #1

    Hello The Code Project I need help on a project, i have an Access 2010 Database and i want to fill a combo box with one column named "Telephones" From a Table named "SIM" I've tryed so many ways but i dont know why i can't make it work Examples:

    private void llenarElementos()
    {

            cbo\_codsim.Items.Clear();
    
    
            int filascod = base\_Gps\_InfoDataSet.Tables\["SIM"\].Rows.Count;
    
            for (int y = 0; y < filascod; y++)
            {
                cbo\_codsim.Items.Add(base\_Gps\_InfoDataSet.Tables\["SIM"\].Rows\[y\]\[1\].ToString());
            }
    
        }
    

    i'm calling that function on the form load.. Also i've tryed to do it by selecting the bindingsource and the table in VS but data don't appear. If you all need the full code just ask :) PD: VS 2008 SP1 Please Help :/

    K 1 Reply Last reply
    0
    • D DJCRIS12

      Hello The Code Project I need help on a project, i have an Access 2010 Database and i want to fill a combo box with one column named "Telephones" From a Table named "SIM" I've tryed so many ways but i dont know why i can't make it work Examples:

      private void llenarElementos()
      {

              cbo\_codsim.Items.Clear();
      
      
              int filascod = base\_Gps\_InfoDataSet.Tables\["SIM"\].Rows.Count;
      
              for (int y = 0; y < filascod; y++)
              {
                  cbo\_codsim.Items.Add(base\_Gps\_InfoDataSet.Tables\["SIM"\].Rows\[y\]\[1\].ToString());
              }
      
          }
      

      i'm calling that function on the form load.. Also i've tryed to do it by selecting the bindingsource and the table in VS but data don't appear. If you all need the full code just ask :) PD: VS 2008 SP1 Please Help :/

      K Offline
      K Offline
      Kevin Marois
      wrote on last edited by
      #2

      DJCRIS12 wrote:

      I've tryed so many ways but i dont know why i can't make it work

      When you say it's not working, what does that mean? it errors, or you get no data, or the combo box it's populating?

      If it's not broken, fix it until it is

      D 1 Reply Last reply
      0
      • K Kevin Marois

        DJCRIS12 wrote:

        I've tryed so many ways but i dont know why i can't make it work

        When you say it's not working, what does that mean? it errors, or you get no data, or the combo box it's populating?

        If it's not broken, fix it until it is

        D Offline
        D Offline
        DJCRIS12
        wrote on last edited by
        #3

        sorry i've solved the issue, my database wasn't recogniced like suposed to be thanks anyways :D!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups