The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: Select, Add, Update, and Delete Data in a ASP.NET GridView Control
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

Aarthi MuthusamiPosted Oct 10, 2017, 6:25 AM
Hi Raj..I was looking at this article and I want to know how to show multiple SQL table in gridview using templatefield. I have two tables fed in dropdown list .I want to display the table selected in ddl. I have edit, delete and select button just like this example. Can you please let me know how do i accommodate columns of different SQL tables?
Brijesh PatelPosted Oct 27, 2015, 4:58 AM
Good Article. Thanks . Das na Das . . .
Christian CruzPosted Apr 28, 2015, 7:41 PM
Me podrias explicar de donde sacas el addnew para ingresar un dato
Nitish SainiPosted Jan 31, 2015, 4:23 AM
how to edit update delete data in gridviewis the main part of ado.net. i want to try explain in details easily. http://www.solvingera.com/example/gridview-example-with-insert-update-edit-delete-command.aspx
Nitish SainiPosted Jan 31, 2015, 3:06 AM
very good article
Daniel Arceo VillegasPosted Oct 24, 2014, 7:34 PM
Could help try to save a new user I get the message Can not insert the value NULL into 'VendorID' column, table 'prueba.dbo.Vendor' occurs. The column does not allow NULL values. INSERT error. Instruction was completed.
anilkumar vemulapalliPosted Jul 15, 2013, 10:48 AM
(TextBox)gvusers.FooterRow.FindControl Cannot convert method group 'FindControl' to non-delegate type 'System.Web.UI.WebControls.TextBox'. Did you intend to invoke the method?
anilkumar vemulapalliPosted Jul 15, 2013, 10:48 AM
this is the error can u rectify
Raj KumarPosted Jan 31, 2013, 9:50 AM
right click on app data folder and click add new item and find .mdf file location and click add.
Rajeev KumareditedPosted Jan 30, 2013, 8:49 AMEdited Jan 30, 2013, 11:31 PM
how attach database in application in aap folder plz help
indrajith mPosted Jan 17, 2013, 6:42 AM
really good thanks
indrajith mPosted Jan 17, 2013, 6:42 AM
really good thanks
srikanth kumarPosted Sep 28, 2011, 6:54 AM
This is very nice article and useful. Particulary article is very simple and understandable.
shashi reddyPosted Feb 14, 2011, 7:00 AM
raj needed sme help how can we Select, Add, Update, and Delete Data in a ASP.NET GridView in a gridview Control
shashi reddyPosted Feb 14, 2011, 6:59 AM
raj needed sme help how can we Select, Add, Update, and Delete Data in a ASP.NET GridView in a gridview Control
arjun shettyPosted May 30, 2010, 9:48 AM
Hi, suggestion for 2 of my questions 1) the grid does not appear if there is no data 2) it would be nice if the new record to enter appears at the top
udayakumar vPosted Dec 10, 2009, 9:49 PM
can u please post the ajax for use of gridview
christian maldonadoPosted Oct 1, 2009, 3:05 PM
Hi sir, can you help to provide me a pure c# windows app code about a datagrid view that edit and delete a row to ms sql?? my email i [email protected] Please help me cause i am new to C# and i am still a student........ Thanks in advance
Maria MaakePosted Sep 9, 2009, 3:17 AM
Raj, would also like to use an xml file instead of a sql database but with the same functionality. please help Marai
sindi mhlongoPosted Sep 2, 2009, 2:11 AM
Hi Raj, I read your article, and would love to have the same code but adding, editing, updating and deleting to an xml file instead of a sql database. Your help will be highly appreciated Regards Sindi
mak makPosted Aug 11, 2009, 9:02 PM
how to control textbox width during editing and updating its increasing ridiculously making mess
Diana HansrajeditedPosted Jul 29, 2009, 7:46 AMEdited Jul 30, 2009, 12:29 AM
When i enter the details and click Add new i get the error as Object reference not set to an instance of an object. Use New keyword to create the object instance When i hard code the values get inserted. Plz help me out? Thanks Diana
haleema sherPosted Jul 16, 2009, 12:24 AM
it show an error while updating that index out of range. plz help
Nasser AL MalkiPosted Jul 6, 2009, 10:36 AM
Dear Rajkumar Can we use your tool in other format, we are intersted to edit entire colums one time ! all the cells with the column should be editable and one button is to save (update) the column. Can you help ?
gugan nathanPosted Jun 24, 2009, 12:50 AM
this aritle is excellent. i learn lot things from this article
Sridhar YPosted May 25, 2009, 8:07 AM
Hi Raj, This is very nice article and useful. Particulary article is very simple and understandable. Can u post or send me the simple article about AJAX. To [email protected] Thanks in advance, Sridhar.
kavi kaviPosted May 11, 2009, 3:27 AM
good post ! In gridview is there any difference in itemtemplate and bound field?
chandrasekhar chavaPosted Mar 13, 2009, 2:43 AM
hi.. this is chandu. i am doing M.C.A . i am doing project on asp.net. i have a problem in accessing the data in grid view control. i am customize the grid view control. my requirement is as follows. Employee number is retrieve from data base and i can provide the salary, da, hra using the text fields of the grid view. when i am pressing the save button the data will be store in data base. please send me the code for it. waiting for your response.
krishna casukhelaPosted Mar 1, 2009, 5:19 AM
Hi, i have followed ur code. But in a 3Tier scenario I am using a an objectdatasource control along with gridview and a business logic layer. The functionality for Update and delete is perfectly working. But I need to add a new row into the gridview when i click the button and then somehow use the objectdatasource control to perform the insert routine. I am unable to do this.. Can u let me know at ur earliest..?If necessary I will send u the code..
Lenin prabu pakiyarajanPosted Jan 31, 2009, 12:01 AM
hai i`m new to asp. i run the above code(ie , ur example ) but i didn`t get the result properly in updation and insert. so please solve this
zubia ahmedPosted Dec 12, 2008, 6:34 AM
WHY YOU ARE NOT INSERTING VENDORID?? IF I M TAKING IT AS PRIMARY KEY THEN HOW IT COULD BE NULL?
zubia ahmedPosted Dec 11, 2008, 1:45 PM
sir,is it possible for u to look at my project if i send it to u?
zubia ahmedPosted Dec 11, 2008, 1:40 PM
itz giving error in my project
sanjay jagtapPosted Nov 25, 2008, 3:15 AM
Respected sir , plese help me i try to update tamplet field in GridViewcontrol in asp.net, i doing same think that above specify u , But my problemis when click on update button that show old value of follwing code , TextBox txtFName = (TextBox)ResultGridView.FooterRow.FindControl("txtQuantity1"); please help me i very confusing ...i wait u r replay.