For demonstration I have created a database (named Database.mdf) in which we have a table named tbl_Employee.

I've a sample below, the Grid View Template is bound to Category Name.

This will trigger the Grid View Row Editing, Row Deleting and Row Updating events respectively.

To trigger the Row Command event you need to set the On Row Command property of your Grid View control.

Inside the template field, we place an item template for displaying records from the database at runtime.

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.

In this tutorial I will show you how you can create an editable Grid View control for administrators to modify database records directly into the Grid View control.In the above code, I set two properties Show Edit Button and Show Cancel Button of Command Field.These properties will automatically render Edit, Update and Cancel buttons inside Grid View column.Now I will show you the C# code behind file of the above ASP.NET page that will handle different Grid View events to provide complete editing functionality.

Leave a Reply

  1. pisces dating scorpio 16-Dec-2017 03:40

    It’s where we discover what we want more of in our life, try new things that we’ve once forgotten (or never gave ourselves permission to do), and uncover what it feels like to be full of childlike wonder.

  2. shemale dating los angeles 26-Oct-2017 01:39

    That said, there is a dangerous trend surfacing, not in “big” government, but in local authorities. Do not react out of ignorance resulting in misplaced anger.

  3. dating someone legally separated 13-Jan-2018 22:55

    Possibly worked in a professional workshop it contains delightful quilting patterns of mermaids, castles, ships and exotic-looking animals.

  4. glovedating 2016 jelsoft enterprises ltd 28-Oct-2017 22:38

    At first, the participants followed a "weight-stabilizing" horny chat sites diet for between 13 and 25 days. Researchers found fetal DNA testing in horny chat sites maternal blood had an accuracy rate of 98.6% for female fetuses and 95.4% horny chat sites for males - across 68 published data sets.