hi..,
how to convert dropdown list items to title case..?
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Lakshmanan Sethu SankaranarayanRank #124 · 17.7K reputationPosted Mar 3, 2014, 12:12 AM EST
VulpesRank #55 · 29.2K reputationPosted Mar 3, 2014, 12:45 AM EST
Lakshmanan Sethu SankaranarayanRank #124 · 17.7K reputationPosted Mar 3, 2014, 1:31 AM EST
VulpesRank #55 · 29.2K reputationPosted Mar 3, 2014, 1:53 AM EST
There's no DropDownList control in Windows Forms but the closest equivalent is the ComboBox.
If the ComboBox isn't data-bound, the following code should work:
object[] items = (from object o in comboBox1.Items select (object)ti.ToTitleCase(o.ToString())).ToArray();
If it is data-bound, then it's best to change the underlying data source.