我正在使用自动完成的ComboBox控件(windows窗体),我发现它上面没有CharacterCasing属性。我想要完成的是在ComboBox上回显大写字母。
comboBox1.DropDownStyle = DropDownStyle.DropDown;
// comboBox1.CharacterCasing = CharacterCasing.Upper ???
以下是我填充comboBox的方法:
ComboBox cb = (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;