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!
Printable View
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!
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.
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!
As always, go to the MSDN documentation, type in bindingsource and start reading.