Rowupdating event in asp net Free amature chat dirty
My problem lies in that the click on the Update Image Button posts back, but neither the Row Command nor Row Updating events get triggered.
I have set the requisite attributes in the Grid View tag.
However, now I am all confused and lost with the Grid View. In the code below I have shown how you can extract the new values from the textboxes inside the Grid View.
Once, you got the values you just need to send them to the database.
Within the Item Template I have an Image Buttong with a Command Name of "Edit".
This works as expected and I can put a breakpoint in the Row Command event handler to see the "Event" command name.
(Note, in the gridview the Enable View State="False" - if I set it to True I get the standard "Failed to load viewstate. error) One strange thing that I've noticed that makes me think it's a View State problem is that if I change the Command Name of the Update button to "Edit" that postback event does get captured in the Row Command event...
No worries, we all started somewhere =) If this helped you, you can click the grey up arrow to vote it up, or accept it with the check mark: How does accepting an answer work?I have a Gridview with Auto Generate Columns="False".I am using a Template Field to display my Edit, Update and Cancel 'buttons' in the first column of the Grid View within respective Item Template and Edit Item Template fields.This enables you to provide an event-handling method that performs a custom routine, such as canceling the update operation, whenever this event occurs.A Grid View Update Event Args object is passed to the event-handling method, which enables you to determine the index of the current row and to indicate that the update operation should be canceled.
By Default, Grid View control displays Item Template which directly shows the Product Name and Unit Price columns but when user clicks Edit button Grid View automatically switches to Edit Item Template and display the control available inside Edit Item Template for user editing.