With a little bit of research, a lot bit of patience, and some help from the internet community, I was able to solve all my issues, and pretty elegantly at that. You can’t do something like Dim name As Hyper Link Dim inv As Text Box name = CType(Grid View1. in an actual post, just email me or comment somewhere and we’ll talk about it.
Basically, I was trying to convert an existing data-display-only Grid View (ie, no special functions) into one where I can update a field, namely the inventory for displayed products. New Edit Index 'set to selected row Bind Grid View() ' your own subroutine that you use to bind your datagrid End Sub Protected Sub Grid View1_Row Canceling Edit(By Val sender As System.
I had to wire up the dirty checking to flag any changes made to the data it contained.
This way we could ignore Postbacks that occured when the Grid View entered Edit Mode – simple…..
when the user clicked on the OK button of the Edit Row.
This could easily be caught in the Row Updated event and seemed a logical choice and initially seemed to work as expected – until one of those damn tester people got hold of it.
Note that the Save button is configured to clear the Dirty Status (i.e. However, as the Grid View only held part of the information on the page we wanted it all to be committed at the same time, i.e.
update the Grid View but not call the Update method of it’s Data Source until the whole page was being committed.
First, create a Grid View with three bound columns and an Update/Edit/Cancel (Command Field) column: Nothing in there should be shocking to anyone: all your events are handled, you have a Hyper Link Field that uses the Data Navigate URLFields property to insert a Product ID, and you have set your Data Key Names property to your hidden field which holds your Product ID.