RADGrid item command shortcut


/ Published in: C#
Save to your folder(s)

Allows quick access to boilerplate code


Copy this code and paste it in your HTML
  1. if (e.CommandName == RadGrid.RebindGridCommandName)
  2. {
  3.  
  4. }
  5. GridEditableItem item = e.Item as GridEditableItem;
  6. if (e.CommandName == RadGrid.InitInsertCommandName)
  7. {
  8. e.Canceled = true;
  9. ListDictionary newValues = new ListDictionary();
  10. e.Item.OwnerTableView.InsertItem(newValues);
  11. }
  12. if (e.CommandName == RadGrid.PerformInsertCommandName || e.CommandName == RadGrid.UpdateCommandName)
  13. {
  14. if (item != null && item.IsInEditMode)
  15. {
  16.  
  17. }
  18. }
  19. if (e.CommandName == RadGrid.DeleteCommandName)
  20. {
  21. if (item != null)
  22. {
  23.  
  24. }
  25. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.