|
-
Jul 20th, 2007, 08:27 AM
#1
Thread Starter
Frenzied Member
[2005] Move a Row Up And Down in a dataset???
Hi Peeps,
I have a dataset which is bound to a datagrid. I also have a move up and down button. If I select a row in my datagrid how do you code the up and down buttons to move the selected row???
Any help please,,,
Jiggy!
-
Jul 20th, 2007, 09:38 AM
#2
Re: [2005] Move a Row Up And Down in a dataset???
Bind the table to a BindingSource and that to the grid, then set the Sort property of BindingSource to sort on some sequential numeric column. To change the order of the rows just swap the values in that column and the rest is done for you.
-
Jul 23rd, 2007, 06:19 AM
#3
Thread Starter
Frenzied Member
Re: [2005] Move a Row Up And Down in a dataset???
Hi Mate,
Thank you for your reply; I am writing a sort number. Do you have an example of the BindingSource as I have never used this.
Thank you,
Jiggy!
-
Jul 23rd, 2007, 07:50 AM
#4
Re: [2005] Move a Row Up And Down in a dataset???
As always, go to the MSDN documentation, type in bindingsource and start reading.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|