[SOLVED] Datagridview move row-up / row-down

Answered Closed
0
0

Hello,

 

is there a way to change to move a row up/down via drag&drop or via a button-up and button-down?

i found the below article but i get an error https://www.youtube.com/watch?v=awG8UZ7WAn8 as the below code is not recognized

rowIndex = DataGridView1.SelectedCells(0).OwningRow.Index

 

I have a built a tool with a datagridview connected to a database, but the user should have the possibility to change the priority.

I can create a button and let the datagridview refresh after every button click up/down but my thought is this will slow down the applications to much.

so my thought was to change the order in the datagridview without updating the database, and in the end the user can click the confirm button to update the database with the new order.

 

has anybody some experience? thanks in advance.

regards,

bjorn

  • You must to post comments
Best Answer
0
0

Hi Bjorn,

you might want to take a look at an older discussion here in the support forum
and its attached sample:

https://wisej.com/support/question/datagridview-dragdrop-move-rows

Hope that helps !

Best regards
Frank

  • You must to post comments
0
0

perfect thanks, I found the same via search 15minutes ago.

i will already test the demo, and i think that’s my solution.

i only have to convert from c+ > vb.net

  • You must to post comments
Showing 2 results