Hi all, I need some help in data grid control. I have placed a datagrid control on the form. There are different fields along with them i have two buttons "Add New" and "Delete".
If I click "Add New" button, a row at the bottom should be created, can anyone tell me how to add row at the bottom of the grid. And after adding it should be editable also..
Also one question. I have added a datagrid buy giving datagrid.datasource=list, at runtime Im not able to edit the datagrid content. Is there any property to make the datagrid editable.
Im really new to .Net, I have come from C background.
Can anyone give me sample example so that I can get my stuff working..
Thanks in advance..
Loading

Mahesh ChandRank #1 · 393.4K reputationPosted Mar 31, 2011, 6:02 AM EDT
Edit, Delete and Update in a DataGrid in Visual Web developer 2005
Insert, Update and Delete in Silverlight DataGrid using ADO.NET
Select, Add, Update, and Delete Data in a ASP.NET GridView Control
Embedded Datagrids with Add, Edit and Delete funtionality
mahesh gupta14 reputationPosted Mar 31, 2011, 7:37 AM EDT
Suthish NairRank #92 · 22.8K reputationPosted Mar 31, 2011, 11:21 AM EDT
Sam HobbsRank #108 · 20.5K reputationPosted Mar 31, 2011, 1:13 PM EDT
Also, it is requested that you use the appropriate forum. This question is about a DataGridView, correct? So it is very easy to put the question in the Windows Forms forum.
A DataGridView has a row at the bottom for creating a new row by default. Are you sure it is not there? If it is not there then perhaps you have the property set so that it is disabled. You don't have to have separate buttons to add and delete rows. You can do that but the DataGridView is designed so that you do not need to.
Yes, there are properties for making a DataGridView editable. Please look at the documentation.
Note that the easiest way to do this is to make a data source from the object, then add the data source to the form. By default, a DataGridView will be used for the data source. The VS IDE can make it amazingly easy. It will create the list for you.