Generic Cancel and Edit Functions for Multiple DataGrids

Added By: xipe

Rated:
(4 of 5) by 7.
Rate Snippet:
Description:  Don't you find boring having to write over and over Cancel and Edit functions for every single Datagrid?, specially if you have multiple datagrids on a single ASPX?, i needed a solution for this, and i wanted to share it, if you found it usefull drop me an email. The Implementation is pretty straight Forward: 1. Copy The code Listed here either to your ASPX Page (Inside the Script Section) or to the CodeBehind (YES the cs File). 2. Modify the DataGridEditCommand (Just in case you need to do Different things on each DataGrid) 3. Modify on you DataGrid Events Properties (On the Design View (if you're using VS) Properties Window) this two: CancelCommand should be pointing to DataGridCancelCommand function (No Additionall Parameters needed) EditCommand should be pointing to DataGridEditCommand (No Additionall Parameters needed). Regards from mexico city
Language:  C#

Save to web space
E-mail Link

Code Snippet: