How to bring the selected rows to top in gridview
Hi i am binding data to gridview first column to select the rows second column customer name third column item name so,..i am selecting some rows after select rows should come to top rows, how to bring the selected rows to top in gridview?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Neha SharmaRank #569 · 4.3K reputationPosted Oct 30, 2012, 2:28 AM EDT
Please refer to the following links:
http://forums.asp.net/t/1490023.aspx/1
It may be help you.
Naresh BeniwalRank #365 · 6.8K reputationPosted Nov 22, 2022, 4:59 AM EST
https://www.codeproject.com/Questions/486024/howplustoplusbringplustheplusselectedplusrowsplust
Aravind GovindarajRank #430 · 5.8K reputationPosted Nov 22, 2022, 9:30 AM EST
Please follow the below steps
1. You have to rebind it on Grid Row on the binding event
2. Take the selected (e args) and map it with the collection
3. Create a temp collection, and inserted the selected key item first, then add the result as a collection in a single shot with filtration of selection. Once data are bound to the grid, please dispose of the temp collection, to avoid memory usage.