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!)

About this user

Lalo

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed 

Populating a Winforms ComboBox with csharp

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;
}
« Newer Snippets
Older Snippets »
1 total  XML / RSS feed