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

Datagrid update command - and validators

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.