Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   GridView, CausesValidation (http://www.velocityreviews.com/forums/t780211-gridview-causesvalidation.html)

WhiskeyRomeo 09-19-2007 09:30 PM

GridView, CausesValidation
 
I am working through a book on ASP.Net, I added a GridView and SQLDataSource.
Everything worked as expected upon debugging. The rows were displayed with
the Update and Delete buttons on each row. Upon pressing update button on a
row, the row did go into edit mode. Changine a few fields and pressing
Update
resulted in nothing happening.

In looking at the book's solution it has a entry for each command button as
follows:

CausesValidation="False"

Adding this property to each command button results in the GridView working
properly. It is as if this line should say AutoPostBack="True".

If this property is required, why isn't automatically entered when dropping
a GridView on the design surface?

If you set CauseValidation="True", again the Update button does not cause a
postback even if you turn the updatable columns into template columns and
create a RequiredField validator for each.

WR


All times are GMT. The time now is 08:41 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.