Find Control("list Box Product"), List Box) If Not ddl Is Nothing Then ddl. Controls(0), Text Box) If Not price Is Nothing Then price.For a while now I’m trying to figure out why my method, triggered by the Grid View.The exact situation I faced is like this – I have a Grid View with a column which contains an edit button.The button is associated with the Command Name property as “Edit”.So when we use these special key words as the Command Name for the buttons in the Grid View, they automatically invoke the built in functionality of the Grid View when we click on the button.
Enabled = allow Admin Edit End If Dim price As Text Box = CType(e. Read Only = Not allow Admin Edit End If Moral of the story is I bypassed the Row Created functionality in the event of an update being triggered.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.Which means I won’t make my 70% code reduction Microsoft has always promised me. 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.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.I do have a Update Products method in my business logic class which is ties into the data class. Once I got that in place, the dropdownlist populated. I haven't had many problems with gridview, but this one has thrown me. Enabled = allow Admin Edit End If Dim price As Text Box = CType(e. Read Only = Not allow Admin Edit End If //some more columns enabled/disabled too End If 0 Then Return If e.