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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
FroglegPosted Feb 6, 2014, 1:52 PM
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();
}
}