Editing and updating in gridview in asp net
In the above tutorial I tried to give you one of the easiest solutions and I hope you can go explore Grid View control editing further after learning the basics from this tutorial.
Follow bellow steps to know how to work with Grid View in ASP.
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[tbl Customers]( [Customer ID] [int] IDENTITY(1,1) NOT NULL, [Customer Name] [varchar](50) NULL, [Phone Number] [varchar](10) NULL, [Address] [varchar](200) NULL, [Is Active] [bit] NULL, CONSTRAINT [PK_tbl Customers] PRIMARY KEY CLUSTERED ( [Customer ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO .
Please keep in mind that there are many different ways to update the database using the Grid View control depending on the type of data you are updating and the functionality the user need and there are many solutions to achieve the same end result.The row now contains two buttons, an Update (one with check image) and Cancel (one with cross image).When the user makes desired changes and clicks the update button, event is fired. NET, like how to insert, delete and update record in Grid View control. Here, I’m explaining how to work with Grid View control in ASP.