Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 May 2nd, 2006, 02:16 AM
Registered User
 
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default datagrid validation


Hi,

Need some help.
I need to put some validations in my datagrid that need to be checked on the click of a single button at the footer.
I have no idea how to do that.

I 'll appreciate ur help greatly.
Bye


 
Old May 10th, 2006, 02:27 AM
Authorized User
 
Join Date: Nov 2004
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if the validation is a client side validation so it would be easy to do it!
you have to write you javascript validation function in the <head> of the .aspx page and then in the "OnClick" event of the button you write the name of the javascript function

example:
let say the javascript function name is "Valid"
so <asp:Button id ="But" runat=server onclick="javascript:Valid()"/>
Note the Valid function must return a boolean value either true or false.

Hope it Helps!

<GMK>
 
Old May 12th, 2006, 02:45 AM
Registered User
 
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks buddy,

But actually i worked it out myself.

What i did was to put in a regularexpression validator in the datagrid item template itself and it took care of the validations that i needed.

Thanks for the response anyways.







Similar Threads
Thread Thread Starter Forum Replies Last Post
Standalone validation + web form validation morbo Struts 0 August 19th, 2008 04:02 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
DataGrid Validation bmains ASP.NET 1.0 and 1.1 Professional 2 December 28th, 2005 03:51 PM
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.