BindingSource bindingsource = new BindingSource(); DataSet ds = new DataSet("Preferences"); DataTable table = new DataTable("Preference"); table.Columns.Add("Value"); for (int i = 1; i <= 12; i++) { table.Rows.Add(i); } ds.Tables.Add(table); bindingsource.DataSource = ds; bindingsource.DataMember = "Preference"; textBox1.DataBindings.Add(new Binding("Text", bindingsource, "Value", true, DataSourceUpdateMode.OnValidation));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)