Posted By

box86rowh on 04/30/13


Tagged

telerik c# DNN


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

danfinrud55


RADGrid item command shortcut


 / Published in: C#
 

Allows quick access to boilerplate code

  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  

You need to login to post a comment.