473,498 Members | 1,074 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid Edit validation

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
1 21409
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1298
by: K Goodson via .NET 247 | last post by:
I want to edit a datagrid by linking to another form(the Edit form) when the user clicks a linkbutton. I am trying to capture the datarow for the datagrid line where the Edit linkbutton is clicked. ...
0
1444
by: Steve Kallal | last post by:
I have a DataGrid with an EditCommandColumn column set to a type of PushButton. I want to set set CssClass on these buttons and cannot without using code-behind code on the ItemDataBound event. The...
3
1617
by: Leo | last post by:
I have a datagrid with the first column as a Edit,Update,Cancel button column. The other 5 columns are template columns. When I click the Edit button in IE6 the row correctly displays the...
2
1387
by: wolfgang wagner | last post by:
hi all! im trying to edit data in a datagrid (like described here: http://aspnet.4guysfromrolla.com/articles/071002-1.aspx) but if i click the edit button i get the following error invalid...
4
2959
by: David Colliver | last post by:
Hi all, I am having a slight problem that hopefully, someone can help me fix. I have a form on a page. Many items on the form have validation controls attached. Also on this form are...
5
4551
by: cwbp17 | last post by:
Hi all, Have a datagrid that displays the price column of a table. Went to the Datagrid's Property builder and set the 'Data Formatting expression' for the PRICE column to {0:c}, so that the...
5
2025
by: Tina | last post by:
the Edit, Update, Cancel, and Delete buttons in my datagrid are causing validation elsewhere on the page. I want to specify that these buttons should not cause validation but they have no design...
9
2706
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
2
1314
by: slinky | last post by:
I had a successfully deployed datagrid reading an XML file and showing the data: Private Function MakeDataView() as DataView Dim myDataSet As New DataSet()...
0
7124
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6884
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4904
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4586
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
651
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.