dotnetmonitor.com

 
Index
Previous
Next

 

/* Need to add a using statement for System.Globalization */

/* Bind a ComboBox (culturesCB) to a current framework cultures */

this.culturesCB.DisplayMember = "EnglishName";

this.culturesCB.ValueMember = "LCID";

this.culturesCB.DataSource = CultureInfo.GetCultures(CultureTypes.FrameworkCultures);

 

/* Set the currently selected item in the ComboBox */

this.culturesCB.SelectedValue = CultureInfo.CurrentCulture.LCID;

Simple Binding
Complex Binding
Using Simple Binding with a List
Sample: Simple Binding to a List (VS 2005) (VS Project: DataBinding Intro)
Type Conversion
Formatting