Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Adding a new row on datagridview in between existing rows


What I have tried:

i have tried to edit datasource(datatable)of grid view.But not working
Posted
Updated 19-Sep-18 22:02pm

1 solution

I hope i understand you correctly...

The order of rows in bounded datagridview depends on its datasource. So, if you would like to add a "row" into bounded datagridview, use: DataRowCollection.InsertAt(DataRow, Int32) Method (System.Data) | Microsoft Docs[^]

For unbouded datagridview, use: DataGridViewRowCollection.Insert Method (System.Windows.Forms) | Microsoft Docs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900