How To Move Selected ListItems to Up in ListBox
Çarşamba, Ocak 14th, 2009 @ 18:52
Call the metod from OnClick Up Button event;
Code ;
public void MoveUp()
{
for (int i = 0; i < ListBox2.Items.Count; i++)
{
if (ListBox2.Items[i].Selected)
{
if (i > 0 && !ListBox2.Items[i - 1].Selected)
{
ListItem bottom = ListBox2.Items[i];
ListBox2.Items.Remove(bottom);
ListBox2.Items.Insert(i - 1, bottom);
ListBox2.Items[i].Value = bottom.Value;
ListBox2.Items[i - 1].Selected = true;
}
}
}
}
Link verin
İlişkili Yazılar :
- How To Move Selected ListItems to Down in ListBox
- Listview’da Selected index
- Bir SPList’in Tüm Item’larını Silmek
- Google Translate Kullanarak .NeT de Dil Çevrimi
- Tracking Outlook Messages
- Itemlar için Checkbox kullanımı
- Machinarium Hileleri
- MSTSCAX.DLL Nasıl Kullanılır?
- Biztalk Server 2010 – Beta
- .NeT Full Screen
Tags: .NeT, ListBox, vs.net
Posted in .NeT 2008 | No Comments »
| Önceki Yazı << Mail Gönderme C# Kodu // Send Mail C# Code | Sonraki Yazı >> How To Move Selected ListItems to Down in ListBox |



