how can i delete the whole rows of gridview using code behind c sharp like
+-----+-----+------+
|Col1 | Col2| Col3 |
| | | |
| a | 1 | 5 |
| | | |
| a | 2 | 6 |
| | | |
| a | 3 | 7 |
| | | |
| a | 4 | 8 |
+-----+-----+------+
and I want to delete the whole rows in the gridview so that it becomes
+-----+-----+------+
|Col1 | Col2| Col3 |
| | | |
| a | 4 | 8 |
+-----+-----+------+
only last duplicate row left and all the rest is deleted (rows are deleted from all the colu开发者_运维百科mns of gridview)
Anyone knows how to achieve this?
Have a look at GridView.DeleteRow()
. MSDN documentation is here: GridView.DeleteRow Method
精彩评论