473,322 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Datagrid update command - and validators

Hi,

I have validators outside of a datagrid (for adding a new grid row) -
however
when i click "edit" column and then the "update" column of a grid row that
has been edited - my other validators on the page fire which i don't want -
i've tried to make them invisible - this hides the controls but i get a
strange error when i click the Update column - i tried to disable them -
they become disabled but i can see my error "*" appearing next to them when
the grid "Update" command is clicked indicating validation is still being
done- i only want grid validation to occur during update - not the entire
page - can this be done?

Thanks a lot!
Nov 19 '05 #1
3 1842
I think with 2003 even with validators assigned to diverent controls, all of
the validators will fire. I have heard that VS 2005 is supposed to allow
only specific validators to fire (or have a fix for this)
other option is setting up custom validators.

"John Blair" wrote:
Hi,

I have validators outside of a datagrid (for adding a new grid row) -
however
when i click "edit" column and then the "update" column of a grid row that
has been edited - my other validators on the page fire which i don't want -
i've tried to make them invisible - this hides the controls but i get a
strange error when i click the Update column - i tried to disable them -
they become disabled but i can see my error "*" appearing next to them when
the grid "Update" command is clicked indicating validation is still being
done- i only want grid validation to occur during update - not the entire
page - can this be done?

Thanks a lot!

Nov 19 '05 #2
Thanks for the feedback!
In the end i filled the validators controls with valid data before disabling
them when the grid was put into edit mode and cleared the controls when the
grid was taken out of edit mode - not the cleanest solution but it works.
Also toyed with the idea of dynamically adding the "causesvalidation=false"
attribute to the grid button controls - but thought this was a hack too far!
Just when you thought a feature was really useful the small print kicks in!
Thanks again!

"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com...
I think with 2003 even with validators assigned to diverent controls, all
of
the validators will fire. I have heard that VS 2005 is supposed to allow
only specific validators to fire (or have a fix for this)
other option is setting up custom validators.

"John Blair" wrote:
Hi,

I have validators outside of a datagrid (for adding a new grid row) -
however
when i click "edit" column and then the "update" column of a grid row
that
has been edited - my other validators on the page fire which i don't
want -
i've tried to make them invisible - this hides the controls but i get a
strange error when i click the Update column - i tried to disable them -
they become disabled but i can see my error "*" appearing next to them
when
the grid "Update" command is clicked indicating validation is still being
done- i only want grid validation to occur during update - not the entire
page - can this be done?

Thanks a lot!

Nov 19 '05 #3
just noticed I posted the same issue today! What did you end up doing again?
Do you have a vb.net code example? Thanx!

chris

"John Blair" wrote:
Thanks for the feedback!
In the end i filled the validators controls with valid data before disabling
them when the grid was put into edit mode and cleared the controls when the
grid was taken out of edit mode - not the cleanest solution but it works.
Also toyed with the idea of dynamically adding the "causesvalidation=false"
attribute to the grid button controls - but thought this was a hack too far!
Just when you thought a feature was really useful the small print kicks in!
Thanks again!

"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com...
I think with 2003 even with validators assigned to diverent controls, all
of
the validators will fire. I have heard that VS 2005 is supposed to allow
only specific validators to fire (or have a fix for this)
other option is setting up custom validators.

"John Blair" wrote:
Hi,

I have validators outside of a datagrid (for adding a new grid row) -
however
when i click "edit" column and then the "update" column of a grid row
that
has been edited - my other validators on the page fire which i don't
want -
i've tried to make them invisible - this hides the controls but i get a
strange error when i click the Update column - i tried to disable them -
they become disabled but i can see my error "*" appearing next to them
when
the grid "Update" command is clicked indicating validation is still being
done- i only want grid validation to occur during update - not the entire
page - can this be done?

Thanks a lot!


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: NETDeveloper | last post by:
Hi, I almost have my nested datagrid working properly. I created a datagrid on a user control and dropped that onto another datagrid. At first, I noticed when I was stepping through the code,...
1
by: Jason | last post by:
I have created a datagrid with several template columns and included validation controls in the template columns. I also have a button column with edit-update-cancel. When the datagrid item is...
4
by: Rod | last post by:
I posted a message to this group yesterday asking how to pass parameters to a web form that is the source of an IFrame on a parent web form. I've gotten my answer, and it works. Thanks! Now I...
2
by: Fluxray | last post by:
--Background: I have a webform including a datagrid. The datagrid is using template. Its ItemTemplate is used to display a look-up-table with labels. its EditItemTemplate is used to edit a row in...
4
by: Luis Esteban Valencia | last post by:
I have a asp.net page (C#), with a datagrid. I use template for all columns, and have <asp:requiredfieldvalidator> in with one of the textboxes, to make sure it's filled in. However, this...
1
by: Dan | last post by:
Hi all, I have a question about datagrid: let's say I have a datagrid which shows the categories for some items; each category has an ID field and a description. I use an ASP.NET page with a...
4
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...
1
by: Kris | last post by:
Hi, I have a DataGrid where in each row has couple of text boxes and an update button. Each row is dynamically generated as the number of rows are not known ahead of time. When the user clicks the...
5
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.