How To Move Selected ListItems to Down in ListBox
Çarşamba, Ocak 14th, 2009 @ 18:54
Call the metod from OnClick Down Button event;
Code ;
public void MoveDown()
{
int startindex = ListBox2.Items.Count - 1;
for (int i = startindex; i > -1; i--)
{
if (ListBox2.Items[i].Selected)
{
if (i < startindex && !ListBox2.Items[i + 1].Selected)
{
ListItem bottom = ListBox2.Items[i];
ListBox2.Items.Remove(bottom);
ListBox2.Items.Insert(i + 1, bottom);
ListBox2.Items[i + 1].Selected = true;
}
}
}
}
Link verin
İlişkili Yazılar :
Tags: .NeT, ListBox, vs.net
Posted in .NeT 2008 | No Comments »
| Önceki Yazı << How To Move Selected ListItems to Up in ListBox | Sonraki Yazı >> Starting a Windows Service from Command Prompt |



