GridView and Page.IsValid
Mark Brackett <[email protected]> Mon, 10 Sep 2007 10:37:30 -0400
| Newsgroups | gmane.comp.windows.devel.dotnet.web |
|---|---|
| Message-ID | <[email protected]> |
The GridView seems to check Page.IsValid before handling an Update
(reflected C#):
private void HandleUpdate(GridViewRow row, int rowIndex, bool
causesValidation) {
if ((!causesValidation || (this.Page == null)) ||
this.Page.IsValid) {
// ... do update to datasource ... //
}
}
But not on Delete. It calls Page.Validate() in bool
HandleEvent(EventArgs e, bool causesValidation, string validationGroup),
but only actually checks Page.IsValid in HandleUpdate(). Personally, I
think it should be checking IsValid on both Delete and Edit commands at
a minimum....
This seems like a huge oversight to me - is everyone hooking a handler
to GridView.RowDeleting and setting e.Cancel = !IsValid?
--Mark Brackett
===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com