Gridview rowupdating get new value dating service for geeks

Clicking on the link buttons raise two events: Just like paging events these events follow pre and post pattern.

The Sorting event allows you to cancel the operation also.

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.

When attached with a Data Source control Grid View performs tasks such as paging, sorting and editing automatically i.e. However, at times you require to bind the Grid View with a Data View or Data Table directly.

The Sort Direction property specifies the direction of sorting i.e. This property is not of much when you are sorting the grid on your own.

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.

The Sorting event handler receives an event argument of type Grid View Sort Event Args.

The Grid View Sort Event Args class has three important properties.

Leave a Reply