Rowupdating not firing vb net
This means that when the user does an update, the data from that update is lost.
You should create your data source once (on the user's first visit) and store it into Session for later use, and only bind the Grid View to the data source when it is necessary to do so.
I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. The Row Update event will load a copy of the product table from the database after successfully updating a row.
Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S. The routine loading of the product table now happens only on the first pass through the code behind.
I also don't understand when I select the grid View control and look at the events in the Properties window of Visual Studio 2010 why I see all the proper event procedures listed for each event I expect to use. So, the Row Update event didn't fire because there was no indication of a Row Update existing.
I am confused at this point on why my markup and code behind is not touching the Row Updating event when Update button is clicked. LOL Each time through the code behind I was loading and binding my product table.I have a Gridview on an ASP page bound to an SQL table. I've configured the Grid to allow Multiple updates by replacing the default Label Controls with Template Fields using the approach described here: Bulk Updates to Rows Bound to a Grid View Everything was working fine, until I made a change to bind the Gridview query programmatically on page load (With the aim of making the Gridview display different data depending on the user currently viewing the page) as described here: Bind Gridview programmatically. Page Protected Sub Page_Load(By Val sender As Object, By Val e As System. Load If Not Is Post Back Then gvbind() End If End Sub Public Sub gvbind() Dim Sql Data Source1 As New Sql Data Source() Sql Data Source1. I would recommend trying this out and starting a new thread in the .NET Forum so that other people can learn from the experience too. -Frinny You may need to turn off validation even if you are not validating anything.After making this change the page now throws the following error when the user makes changes and clicks the update button: I have read many threads on similair problems but I can't seem to find a solution to my error. Here's the Code: Public Class Input Inherits System. I don't know why dynamically binding the Gridview would cause an error in rowupdating. Data Row Then If Not table Copied Then original Data Table = CType(e. Click original Data Table = CType(View State("original Values Data Table"), System. Data Table) For Each r As Grid View Row In Grid View1. You have to make sure that you aren't setting your Grid View's data when it is not postback.If you do this, your Grid View's source will be refreshed before you're able to grab the new values out of it.