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
A

adrian salas

@adrian salas
About
Posts
6
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to fill a combobox with a class
    A adrian salas

    I did it and there is not error messages, but what I need to do to see the NationSelector combobox in the toolbox? because I compile the code and It does not appear. Thanks.

    C# question database tutorial

  • how to fill a combobox with a class
    A adrian salas

    Hi, I did it as you told me: protected override void OnLoad(object sender, EventArgs e) { BDconexion bdConex = new BDconexion(); string nacionalidad = "select * from cs_nacionalidad"; try { //open connection bdConex.OpenConnection(); //create command and assign the query and connection from the constructor MySqlDataAdapter da = new MySqlDataAdapter(nacionalidad, bdConex.conn); //create dataset DataSet ds = new DataSet(); // filling dataset da.Fill(ds, "cs_nacionalidad"); //dataset values NationSelector1.DataSource = ds.Tables["cs_nacionalidad"]; NationSelector1.DisplayMember = "nm_nacionalidad"; NationSelector1.ValueMember = "cd_nacionalidad"; //close connection bdConex.CloseConnection(); } catch (Exception ex) { MessageBox.Show(ex.Message); } But I am having problem with these lines: NationSelector1.DataSource = ds.Tables["cs_nacionalidad"]; NationSelector1.DisplayMember = "nm_nacionalidad"; NationSelector1.ValueMember = "cd_nacionalidad"; what is the name that I should write instead of NationSelector1? thanks.

    C# question database tutorial

  • how to fill a combobox with a class
    A adrian salas

    how do I call the class with the combobox as a parameter? Thanks

    C# question database tutorial

  • how to fill a combobox with a class
    A adrian salas

    Hi, I am filling a combobox with the code below: private void frmCrearCooperativa_Load(object sender, EventArgs e) { string nacionalidad = "select * from cs_nacionalidad"; try { //open connection bdConex.OpenConnection(); //create command and assign the query and connection from the constructor MySqlDataAdapter da = new MySqlDataAdapter(nacionalidad, bdConex.conn); //create dataset DataSet ds = new DataSet(); // filling dataset da.Fill(ds, "cs_nacionalidad"); //dataset values cboNacionalidad.DataSource = ds.Tables["cs_nacionalidad"]; cboNacionalidad.DisplayMember = "nm_nacionalidad"; cboNacionalidad.ValueMember = "cd_nacionalidad"; //close connection bdConex.CloseConnection(); } catch (Exception ex) { MessageBox.Show(ex.Message); } how do I can do a class that fills the combobox with this code? because I have to write it down in all forms. thanks.

    C# question database tutorial

  • C# session
    A adrian salas

    I mean Roles, I want that some users can see an especific window and someone diferente can not do it.

    C# csharp tutorial question

  • C# session
    A adrian salas

    Hello, I am trying to make and c# application using sessions to control the app access, somebady knows how to do it? Regards.

    C# csharp tutorial question
  • Login

  • Don't have an account? Register

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