Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Populating a Winforms ComboBox with csharp (See related posts)

private void PoblarComboPais()
{
// Trae las sociedades correspondientes al país
Cursor.Current = Cursors.WaitCursor;
// Conexión
string cn = SqlOptions.ConnectionString();

// DataReader
this.cboPais.DataSource = SqlHelper.ExecuteDataset(cn,CommandType.Text , "SELECT * FROM MAE_PAIS").Tables[0];
this.cboPais.ValueMember = "chrPais";
this.cboPais.DisplayMember = "chrPaisNombre";

//Puntero del mouse normal
Cursor.Current = Cursors.Default;
}

You need to create an account or log in to post comments to this site.


Related Posts