I have two GridViews. One is Source GridView and another one is Destination GridView.
Two GridViews are loaded with some records.
In the Destination GridView, One CommandField Column is added which shows “Delete”.
Here I want to move one row from the Source GridView to the Destination GridView. Suppose if i dont want, I can remove the newly added record by clicking the Delete Command Field in the GridView.
Except the Deleting the Rows, I have completed the other things. How to delete the newly added records.
The DeleteCommand Field in the Destination Gridview is enabled only for the newly added records otherwise it should enabled false.
Any Suggestions.
Do not add commandfield column rather add a templatefield. in that templatefield add a itemtemplate, an ImageButton and keep the enabled property of ImageButton as true for rows which are added from source grid and false for others.(This you can check by keeping a label in gridview which should be hidden and set its text to “true” for rows got from source grid)
EXAMPLE :