Click here to Skip to main content
15,920,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is it possible to get Gridview style Edit, Update, Cancel , Insert for Datagridview in Windows Form? I want every row in datagridview in windows form to have Edit, Update, Cancel, Insert, so that data can be edited in datagridview in place. Any help will be appreciated.
Posted

1 solution

You have to add new Columns to the DataGridView.
Then inside cell click event, you need to check what is the ColumnIndex. If it matches with the Column, where you have added the Button, then you will run a logic to Edit/Update/Delete the Row.

See one example here - C# tutorial: add, delete, and edit rows in DataGridView[^]
 
Share this answer
 
Comments
Madhukar Krishna 10-Oct-14 1:56am    
Thank you for your answer. But I was looking for gridview style edit, update delete for datagridview, which I read an article somewhere is not possibale for datagridview.
It cannot be directly similar, but you can mimic some of the features.

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