Forum guidelines
AuthorQuestion
How to remove specific item from ListView
Posted By shah on 04 May 2007
I am trying to remove item from ListView but when i click on remove it doesnt remove the last item or in the middle but when i select the first item it removes. How is it possible to remove any selected item in the list? [code] private void removeBtn_Click(object sender, EventArgs e) { for (int i = scheduleListView.SelectedItems.Count - 1; i >= 0; i--) { if (scheduleListView.Items[i].Selected) { scheduleListView.Items.Remove(scheduleListView.Items[i]); } } } [/code] Thanks
shah
AuthorReply
shah
  • 0
  • 0
Re: How to remove specific item from ListView
Posted By shah on 04 May 2007  
It worked. Thanks
shah

SPONSORED BY

Custom Software Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.