Gridview rowupdating does not fire


15-Apr-2020 09:30

Row Command, Address Of dg_Row Command ' Add Handler dg. Selected Index Changed, Address Of dg_Selected Index Changed Add Handler dg.

Row Updating, Address Of dg_Row Updating ' Add Handler dg. Row Canceling Edit, Address Of dg_Row Canceling Edit Add Handler dg.

Text End Sub Hi, Another issue is where to add controls.

Row Canceling Edit, Address Of dg_Row Canceling Edit ' Controls.

Hi All, I am building a custom composite control with VS2008 which contains a Grid View.

Everything works as advertised but for the life of me I can't get the Row Updating Event to fire. Row Updating, Address Of dg_Row Updating never fires at all. Thanks Gehres Here is my Code: Public Class Poll Admin Inherits Composite Control Implements INaming Container Dim sql As New SQLCrud Public Event Question Submitted As System.

Find Control("dg"), Grid View) Dim str Question As String = datagrid.

Find Control("dg"), Grid View) End Select End Sub Public Sub dg_Row Updating(By Val sender As Object, By Val e As Grid View Update Event Args) Dim datagrid As Grid View datagrid = CType(Me. Row Canceling Edit, Address Of dg_Row Canceling Edit Controls.

Text End Sub End Class HI Allen & All, That worked! Have best practices changed since this book was published? But anyway I got it to work and I thought I would post my code here for any that may be going down the same path.

Find Control("dg"), Grid View) Case Is = "Delete" Case Is = "Cancel" Dim datagrid As Grid View datagrid = CType(Me. Text End Sub Public Sub dg_Row Canceling Edit(By Val sender As Object, By Val e As Grid View Cancel Edit Event Args) End Sub Public Sub dg_Row Editing(By Val sender As Object, By Val e As Grid View Edit Event Args) Dim datagrid As Grid View datagrid = CType(Me. Row Command, Address Of dg_Row Command Add Handler dg.

Find Control("dg"), Grid View) Case Is = "Edit" Dim datagrid As Grid View datagrid = CType(Me. Row Updating, Address Of dg_Row Updating Add Handler dg.

Row Editing, Address Of dg_Row Editing Add Handler dg.

Click, Address Of btn Submit Button_Click Dim dg As New Grid View Dim listb As New List Box Add Handler dg. Row Editing, Address Of dg_Row Editing ' Add Handler dg. Row Canceling Edit, Address Of dg_Row Canceling Edit Add Handler dg. Add(New Literal Control("")) 'second Row Dim pnl Create As New Panel pnl Create.