This is a repost of this:
Draganddrop unable to change the order of gridview row using C#[
^]
Either you are posting the same question - and code fragments - under two users, or your class is all trying to solve the same problem in identical code.
Either way it's a waste of our time to have it in two places, and / or of your time if it's the same class assignment (given that two identical answers will be noticed by your tutor, trust me).