rchambers
asked on
Gridview OnRowUpdating
Hi
I have a gridview which is populated from a query which concatenates a series of strings. This means that I can't directly edit via the edit button.
I have put an OnRowUpdating event handler which then changes the data progamatically. It seems to work fine except it doesn't reset the cancel/update buttons to edit.
Protected Sub gwSubAddress_RowUpdating(B yVal sender As Object, ByVal e As GridViewUpdateEventArgs)
' does lots of stuff with stored procs which update the underlying data
e.Cancel = True
End Sub
How do I get the cancel/update buttons to be replaced with the edit button (ie have the effect of clicking the cancel button)
Thanks
I have a gridview which is populated from a query which concatenates a series of strings. This means that I can't directly edit via the edit button.
I have put an OnRowUpdating event handler which then changes the data progamatically. It seems to work fine except it doesn't reset the cancel/update buttons to edit.
Protected Sub gwSubAddress_RowUpdating(B
' does lots of stuff with stored procs which update the underlying data
e.Cancel = True
End Sub
How do I get the cancel/update buttons to be replaced with the edit button (ie have the effect of clicking the cancel button)
Thanks
ASKER
Thanks
Sorry to be a pain but if I use e.cancel in the rowupdating handler then won't the OnRowUpdated fail to fire?
If I take the e.cancel out of the RowUpdating how do I reset it before I get the "Updating is not supported by data source 'sdsAddress' unless UpdateCommand is specified" error?
Sorry to be a pain but if I use e.cancel in the rowupdating handler then won't the OnRowUpdated fail to fire?
If I take the e.cancel out of the RowUpdating how do I reset it before I get the "Updating is not supported by data source 'sdsAddress' unless UpdateCommand is specified" error?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
that worked exactly as I wanted it to, thank you
Hey, I m glad i could help you! I was felling i was not so clear in that last comment, but i guess you get the essence of what i wanted to say.
RowUpdating Does the job
RowUpdatad Check the job and update the ui