Tutorial :How to force character casing (capitalized) in a ComboBox C#? Is it possible?



Question:

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 = (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;  


Solution:1

Try this:

WPF ComboBox, force input to UpperCase


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »