Gridview1rowupdating object sender gridviewediteventargs e

Fill(dt); return dt; } public class My Table Row { public int cid; public string fnme; public string lnme; public string add; public string phn; public string mail; } public class My Table { public System. Array List arraylist = new Array List(20); } public My Table mt = new My Table(); private void Fill Data() { dt = new Data Table(); Sql Command command = new Sql Command("SELECT * FROM customer", connection); Sql Data Adapter da = new Sql Data Adapter(); da.

gridview1rowupdating object sender gridviewediteventargs e-29

Count; for (int i = 0; i Code snippet (Database Table): USE master IF OBJECT_ID('dbo.customer', 'U') IS NOT NULL DROP TABLE dbo.customer CREATE TABLE dbo.customer ( custid int identity(1,1) NOT NULL, fname varchar(50), lname varchar(50), address varchar(50), phone varchar(50), email varchar(50), CONSTRAINT PK_customer PRIMARY KEY(custid) ); GO INSERT INTO customer(fname, lname, address, phone, email) VALUES('Bill', 'Gates', 'Medina, Washington, USA', '001202', '[email protected]'); GO INSERT INTO customer(fname, lname, address, phone, email) VALUES('George', 'Bush', 'Washington D.

When you edit a row, controls in the row will changed to Text Box. One is to get the textbox control first, then retrieve the value from the textbox.

Text; Try also to add this codes below protected void Grid View1_Row Editing(object sender, Grid View Edit Event Args e) { Grid View1. New Edit Index; p Bind Data(); } Hi, zippo: In your gridview, the data columns are generated automatically.

I'm following you completely on everything but for where to place the Label 1 boundfield.

Edit Index = -1; bindall(); } protected void Grid View1_Row Editing(object sender, Grid View Edit Event Args e) { Grid View1. New Edit Index; bindall(); } protected void Grid View1_Row Updating(object sender, Grid View Update Event Args e) { int id = (int)Grid View1.

Last modified 07-Oct-2014 04:59