Move row in GridView

  • Thread starter Thread starter Claus Pedersen
  • Start date Start date
C

Claus Pedersen

Hi

Is it possible to

1: Move a row up/down serverside. Like myGridView.Rows[1].MoveUp()
I can't find any way to do this.

OR

2: Edit the datakey values on a GridViewRow. If I can do that I have
solved the move up/down problem because I can switch data between the rows.

Best regards

Claus Pedersen
 
Hi Claus,

We cannot move a row up/down at server side. Since a database table is only
an aggregate of rows, it doesn't care about the order. You can only user
Order By clause when SELECT data from the table. If you're using an
auto-increment field as the primary key, you cannot modify it, since it's
readonly.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top