Gridview rowupdating get new value
This argument provides the new page number that the user has selected via a property called New Page Index.We set Page Index property of the Grid View to this new page number and call the Bind Grid() method again.The Data View supplies all the records from the Employees table.In order to implement paging you need to set Allow Paging property of the Grid View control to True. There are two events of Grid View that are related to paging.The Sorting event handler receives an event argument of type Grid View Sort Event Args.
The following figure shows the Grid View after implementing paging. First of all, you need to set Allow Sorting property of the Grid View to True.Other templates used here are Edit Item Template and Footer Template. CREATE PROCEDURE [dbo].[employee_pro] ( @empid as int=0, @name as varchar(50)='', @address as varchar(50)='', @designation as varchar(50)='', @status as varchar(50)='' ) AS BEGIN SET NOCOUNT ON; if(@status = 'Display') begin Select * from employee end else if(@status = 'Add') begin Insert into employee(name,address,designation,createtime) values (@name,@address,@designation,getdate()) end else if(@status = 'Update') begin Update employee set [email protected], [email protected],[email protected] where [email protected] end else if(@status = 'Delete') begin Delete from employee where [email protected] end ENDStored cs using System; using System. There are many articles and tutorials around that illustrate the use of Grid View control along with the new Data Source Controls.For more information about handling events, see NIB: Consuming Events.In this article we will learn how to insert, edit, update and cancel the records in a Grid View using a single stored procedure.