GridView: Cancel Update using vb Code.

E

Ed Warren

I have a gridview. It has the duty edit button.
when I click the update button
the updating event fires
(all is as I want)
instead of doing an update, I need to capture the new data --done that using
the event e variable. (still ok)

However, here is the question. After I'm through, I need to stop the update
I really do not need finish the update, but I do need to return to the form
with the gridview no longer in the edit mode. (I need to cancel the update
using code).

After a few hours of searching, coding, and frustration --- I'm
stupid/stumped. This should be easy, so I'm missing something (GCE).

Thanks,
 
E

Ed Warren

Thanks for the note Phillip, but I've tried that, the code you have shown
cancel's the update okay, but it returns the row still in the edit state.

I found an answer
I set the
grid.datasourece.editrowindex = -1

then called the

e.cancel
That worked.


Ugh!! now where could I find something that simple!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top