I have listview control on window application c# . http://prntscr.com/2po17p
i want to move next item alphabetically when i press key .Please tell the solution
Thank You
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
FroglegRank #1,020 · 1.9K reputationPosted Feb 6, 2014, 8:52 AM EST
public partial class Form1 : Form
{
string[] names = { "Zorro","Ali Hamza Gondal", "Farad", "Wagas", "Bill", "Obama", "Richard","Andrew","Umair" };
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
loadList();
}
public void loadList()
{
listView1.Items.Clear();
foreach (string ss in names)
{
listView1.Items.Add(ss);
}
}
private void button1_Click(object sender, EventArgs e)
{
Array.Sort(names);
loadList();
}
}