All samples of course assume you’re doing everything in your page, but I have to do everything in my code-behind, because on forehand I don’t know what I’ll be binding to my Grid View.
Check out what I’m trying to do, maybe you can help?
For example a Sql Data Source, which is automatically added to your Web Form if you drag-n-drop your way around Visual Studio 2005.
The problem is, I’d very much like to do so, if ASP. But I can’t set a Data Source property or anything on the Sql Data Source!!! I probably have to read the cells on the Grid View of the selected row, find the controls, get the values from those and insert those into my Data Set.
When we edit a row in our Grid View and press the “Update” button, at some time it’s received in the Row Updating method.
But as I noted in the comments in that method, some collections that should contain the columns (names, old values and new values) are always empty. And the Row Updated method is never even touched!!! NET Forums that I need to use a Data Source control.
You'll be able to ask questions about coding or chat with the community and help others.
I am using a SQLData Source to populate my gridview in ASP. When I hit Edit, the textboxes appear and I am able to edit my values. I am using a SQLData Source to populate my gridview in ASP. When I hit Edit, the textboxes appear and I am able to edit my values. In the Row Editing function, the edit textboxes appear and I can get the "old" values Then the page renders, I edit the textboxes and hit Update.
First, I load up some data: After that, I’m doing some work to make my Grid View look beautifull, adding all columns by hand.
But for this demo, I’ll show you the simple version, that also doesn’t work 🙂Let’s bind the data to our Grid View and have it autogenerate our columns, as well as an edit button.
For a while now I’m trying to figure out why my method, triggered by the Grid View.