Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. private void grdvTest_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
  2. {
  3. try
  4. {
  5. var grdv = sender as DataGridView;
  6. foreach(DataGridViewRow row in grdv.Rows)
  7. {
  8. DataGridViewCell BookButtonCell = row.Cells[0];
  9. ViewModelMyItem item= row.DataBoundItem as ViewModelMyItem ;
  10.  
  11. if (item.IsDeleted)
  12. {
  13.  
  14. row.Cells.Remove(BookButtonCell);
  15. }
  16. }
  17. }
  18. catch(Exception ex)
  19. {
  20. throw ex
  21. }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement