Last post Jan 15, 2013 09:20 PM by Decker Dong - MSFT
Jan 14, 2013 04:56 AM|zaidmctaie|LINK
I'm using VS 2010 asp.net C#
I want to change the order of rows in database using a listbox and (up, down) buttons. I retrieve 3 columns from DB (ID, Name, Order) then put it in a dataset and bind the (Name) column the listbox. I want to change the order field and pass the new order
to database, by selecting a (Name) from the listbox and click the up button must effect 2 rows in database with each button click.
I want to know how to pass the new (order) to the DB and the stored procedure, and include some code please.
The order field is int number.
Jan 15, 2013 09:20 PM|Decker Dong - MSFT|LINK
Change order column from listbox
Maybe you have to dynamically generate the columns' order in the SQL statement, and then use SqlDataAdapter.Fill into a DataTable and then bind to the GridView.