Rowupdating event in aspxgridview
This can be beneficial to other community members reading the thread. Will i still be able to get the value for the 7th column from the dictionary? My gridview also has over 3000 rows, I display 50 rows per page. To String() ' Establishes values sent to STORED PROCEDURE item Data Source. And one Template Field for which I use Find Control. Have you checked if there is anything in the Dictionary? The Find Control won't work, as the Text Box that the Bund Field has created doesn't have the field name for ID. Please remember to click “Mark as Answer” on the post that helps you.
When all you've got is a Hammer, Every Problem looks like a Nail. I don't understand your datasource lines, I have a Data Bind sub routine I call at each need to bind data. This can be beneficial to other community members reading the thread. Please remember to click “Mark as Answer” on the post that helps you.
I tried adding a check for the postback, and that also got rid of the error, but now when I click on the update button, the entire Grid View control disappears, and the Row Updating event handler still doesn't run.
I'm obviously doing something very wrong, but I cannot fathom what.
Basically, I have handled 4 events for the Grid View: Row Editing, Row Canceling Edit, Row Updating and Row Deleting.
USE [Adventure Works] GO /****** Object: Stored Procedure [Human Resources].[Update Employee Gender] Script Date: 04/08/2011 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: -- ============================================= CREATE PROCEDURE [Human Resources].[Update Employee Gender] @Employee ID [int], @Gender [nchar](1) AS BEGIN UPDATE [Human Resources].[Employee] SET [Gender] = @Gender WHERE [Employee ID] = @Employee ID; END GO Is there any specific reason that column to be identified as User Id in the code?
If not, this should resolve your problem right, protected void Grid View1_Row Updating(object sender, Grid View Update Event Args e) Is there any specific reason that column to be identified as User Id in the code?