Suppose I need to change the status of an item from active = true to active = false and vise versa and at the same time persist my change in the database table.
I tested ItemChecked event like the following:
private void listView1_ItemChecked(object sender, ItemCheckedEventArgs e)
{
ListViewItem item = (ListViewItem)sender;
if (item != null)
{
Book b = (Book) item.Tag;
b.MakeActive(item.Checked);
}
}
I failed.
Can anyone help me?