we often need to delete item from Listview. You have to use context menu for perform delete operation. then on your delete event just write:
Download the Latest Sample
Enjoy....!!
private void ticketRemovebutton_Click(object sender, RoutedEventArgs e)
{
if (ticketlistView.SelectedItem != null)
{
ticketlistView.Items.RemoveAt(ticketlistView.Items.IndexOf(ticketlistView.SelectedItem));
}
else
{
MessageBox.Show("Please select item for remove from the list");
}
}
Download the Latest Sample
Enjoy....!!
Comments
Post a Comment