Rowupdating object sender gridviewupdateeventargs e

Add a Hidden Field to your Edit Item Template and use that.

The Grid View control raises the Row Updating event when a row's Update button is clicked, but before the Grid View control updates the row.The database table used here has just two fields (sid and sname) My code is as follows: Web Page: --------------------------------------------------------------------------------------------------- im having the same problem i think: in my case i have set binding for template fields; ive a grid with 2 types of field: - bound filed editable (no the tamplate) - bound readonly field (template field) ive set Eval for the template and it is readonly, i placed also Bind to make a test but still count is zero; also had a try changing the datasource, and sure i have set the key field for the grid. OK, so I solved my problem, but not straight forward. I am having a similar problem, but I don't have any Edit Item Template items in my grid. I just changed my code to use an Object Data Source. Collections; public partial class _Default : System. C., USA', '001202', '[email protected]'); GO INSERT INTO customer(fname, lname, address, phone, email) VALUES('Gordon', 'Brown', 'London, UK', '0044020', '[email protected]'); GO INSERT INTO customer(fname, lname, address, phone, email) VALUES('Yasuo', 'Fukuda', 'Tokyo, Japan', '0081003', '[email protected]'); GO INSERT INTO customer(fname, lname, address, phone, email) VALUES('Angela', 'Merkel', 'Berlin, Germany', '0049030', '[email protected]'); GO INSERT INTO customer(fname, lname, address, phone, email) VALUES('Nicolas', 'Sarkozy', 'Paris, France', '0033001', '[email protected]'); GO INSERT INTO customer(fname, lname, address, phone, email) VALUES('Stephen', 'Harper', 'Ottawa, Canada', '001613', '[email protected]'); GO INSERT INTO customer(fname, lname, address, phone, email) VALUES('Romano', 'Prodi', 'Rome, Italy', '0039006', '[email protected]'); GO INSERT INTO customer(fname, lname, address, phone, email) VALUES('Vladimir', 'Putin', 'Moscow, Russia', '007095', '[email protected]'); GO INSERT INTO customer(fname, lname, address, phone, email) VALUES('Ban', 'Ki-moon', 'New York, USA', '001718', '[email protected]'); GO SELECT * FROM customer Are you sure that those lines of codes below has a value? Page Code snippet (Default.aspx): 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.

Leave a Reply