By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,505 Members | 1,165 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,505 IT Pros & Developers. It's quick & easy.

Datagrid Edit validation

P: n/a
Is the any way to use a regularexpressionvalidator to validate information
entered in a datagrid after the rows edit button is pushed?

I know I can do it server side but I want to do it client side if I can.
thanks,
G
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi G:

You can add the validation control to the EditItemTemplate:

<EditItemTemplate>
<asp:TextBox runat="server" id="edit_Phone"
...
/>
<asp:RequiredFieldValidator
ControlToValidate="edit_Phone"
...
/>
<asp:RegularExpressionValidator
ControlToValidate="edit_Phone"
ValidationExpression="[0-9]{3} [0-9]{3}-[0-9]{4}"
...
/>
</EditItemTemplate>

HTH,

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 10 Feb 2005 16:15:56 -0800, "G Dean Blake" <gb@nospam.com>
wrote:
Is the any way to use a regularexpressionvalidator to validate information
entered in a datagrid after the rows edit button is pushed?

I know I can do it server side but I want to do it client side if I can.
thanks,
G


Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.