@denesh neupane , Welcome to Microsoft Q&A, you could try to update every row's id to arrange the id after deleting the row in the datagirdview.
Code:
Note: I can not show the code use the code block so I used picture to replace it.
You could refer to the txt file.
211498-code.txt
Result:
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.