On Delete
The OnDelete()
Event is a callback which is invoked when the user deletes row(s).
//Bind the list to datagrid view
_dataGridView.OnDelete<User>((user,row) =>
{
MessageBox.Show(user.Age.ToString());
return true; //return false to cancel
});
// add false to the second parameter to disable confirmation
_dataGridView.OnDelete<User>((user,row) =>
{
MessageBox.Show(user.Age.ToString());
return true;
},false);
Last updated
Was this helpful?