471,316 Members | 989 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,316 software developers and data experts.

Using the RowUpdating event in GridView without an SQL Update command

I have a GridView that is pulling data from a SQL database using a
Select command. I would like to use GridView's built-in "Edit, Update,
Cancel" functionality because it is very handy.

However, when the user clicks the Update button I DON'T want to run an
SQL UPDATE command on the database, I just want to handle it myself.

So far to get around this I just create a dummy SQL query that never
updates any rows and let it complete, then do the work I want to do in
RowUpdating.

If I cancel the Update using e.Cancel, the GridView stays in the "Edit"
state, when I want it to go back to the "View" state.

Is there anyway to not specify an UPDATE command at all? If I take it
out it gives me an error.

Any ideas?

Nov 19 '05 #1
0 2283

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by slemen | last post: by
3 posts views Thread by nick chan | last post: by
reply views Thread by =?Utf-8?B?UGF1bA==?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.