I'm using a ComboBox control (windows forms) with auto complete, and I found out that there is no CharacterCasing Property on it. What I'm trying to accomplish is to echo upper case letters on the ComboBox.
comboBox1.DropDownStyle = DropDownStyle.DropDown;
//comboBox1.CharacterCasing = CharacterCasing.Upper ???
Here's how I populate the comboBox:
ComboBox cb =开发者_Go百科 (ComboBox)sender;
pl.cmd = new SqlCommand("LOOKUP", pl.ConnOpen());
pl.cmd.CommandType = CommandType.StoredProcedure;
pl.cmd.Parameters.Add(new SqlParameter("@TABLENAME", (object)tableName));
pl.da = new SqlDataAdapter(pl.cmd);
dt = new DataTable("dt");
pl.da.Fill(dt);
cb.DataSource = dt;
cb.ValueMember = valueMember;
cb.DisplayMember = displayMember;
Try this:
WPF ComboBox, force input to UpperCase
精彩评论