Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 27th, 2005, 09:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default DataGrid Validation

Hello,

I'm having a problem with validation and the datagrid. I have a form with a search area, then a datagrid below (with editing capabilities). I also override the footer to provide textboxes for insertion purposes, so for all of this, I'm using the templatecolumn to provide this. Now, since it is a 1.1 app, I don't have validationgroups option. But the problem I'm having is you can search, then change the search and search again, which raised validation, so I turned off causesvalidation, that worked fine.

But the opposite doesn't work; how do I turn off validation for buttons in a datagrid? Specifically how to handle edit, update, cancel buttons?

Thanks.


Brian
__________________
Brian
 
Old December 28th, 2005, 02:53 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Try converting the edit,update,cancel column to a template column. Then for each button, set the CausesValidation = False

Jim
 
Old December 28th, 2005, 03:51 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Use the ItemCreated event for the grid, check the item type (look for the EditItem), then go thru the controls in the appropriate cell and set the CausesValidation property on all the buttons in that cell.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Standalone validation + web form validation morbo Struts 0 August 19th, 2008 04:02 AM
datagrid validation bala24 General .NET 2 May 12th, 2006 02:45 AM
Validation in Edit mode of Datagrid Control pramesh_it ASP.NET 1.0 and 1.1 Basics 1 April 3rd, 2006 10:29 AM
Conditional Validation in a DataGrid acorbo ASP.NET 1.0 and 1.1 Professional 0 August 24th, 2004 01:12 PM
Creating on-demand validation in DataGrid sankar General .NET 0 June 22nd, 2004 05:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.