Home All Groups Group Topic Archive Search About

Validation with DetailView

Author
30 Aug 2006 5:13 PM
bmayer@mnepilepsy.net
I have a form that has two gridviews for displaying data, two details
view are associated with the gridviews. The details views are used for
inserting individual records, which are then displayed by the
gridviews. The records are inserted by using the auto generated insert
buttons in the details view. There are also several text boxes that
need to be saved off to the DB when a button is pressed. There are
several validates contained in the detailsviews. I want them to
validate only inside of their respective detailsviews, not the entire
page.

>From my understanding of how validate groups work, you can set the
validatorgroup property of a button to be the same as those of the
validates and then you can have several different groups which will be
independent of each other.

The problem that I am having is that I can not find the ValidationGroup
property for the insert link in the detailsview. This means that I have
to have values filled in both detailsviews to be able to submit one of
them.

Do I need to generate the buttons myself and then set the
validationgroup property?

Author
30 Aug 2006 5:43 PM
Kyle K.
Try this...

- In Design mode, open the DetailsView Tasks window by clicking the
little arrow at the top-right of the control and click the 'Edit
fields...' link.
- In the dialog the opens up, select the 'CommandField' entry in the
'Selected fields:' box in the bottom-left.
- In the 'CommandField Properties:' box on the right, assign
CausesValidation = 'true' and ValidationGroup = '(group you defined)'.

This should have the effect you are looking for.

-={ Kyle }=-


bma***@mnepilepsy.net wrote:
Show quoteHide quote
> I have a form that has two gridviews for displaying data, two details
> view are associated with the gridviews. The details views are used for
> inserting individual records, which are then displayed by the
> gridviews. The records are inserted by using the auto generated insert
> buttons in the details view. There are also several text boxes that
> need to be saved off to the DB when a button is pressed. There are
> several validates contained in the detailsviews. I want them to
> validate only inside of their respective detailsviews, not the entire
> page.
>
>>From my understanding of how validate groups work, you can set the
> validatorgroup property of a button to be the same as those of the
> validates and then you can have several different groups which will be
> independent of each other.
>
> The problem that I am having is that I can not find the ValidationGroup
> property for the insert link in the detailsview. This means that I have
> to have values filled in both detailsviews to be able to submit one of
> them.
>
> Do I need to generate the buttons myself and then set the
> validationgroup property?
>
Are all your drivers up to date? click for free checkup

Author
30 Aug 2006 5:53 PM
bmayer@mnepilepsy.net
Perfect! Thank you.


Kyle K. wrote:
Show quoteHide quote
> Try this...
>
> - In Design mode, open the DetailsView Tasks window by clicking the
> little arrow at the top-right of the control and click the 'Edit
> fields...' link.
> - In the dialog the opens up, select the 'CommandField' entry in the
> 'Selected fields:' box in the bottom-left.
> - In the 'CommandField Properties:' box on the right, assign
> CausesValidation = 'true' and ValidationGroup = '(group you defined)'.
>
> This should have the effect you are looking for.
>
> -={ Kyle }=-
>
>
> bma***@mnepilepsy.net wrote:
> > I have a form that has two gridviews for displaying data, two details
> > view are associated with the gridviews. The details views are used for
> > inserting individual records, which are then displayed by the
> > gridviews. The records are inserted by using the auto generated insert
> > buttons in the details view. There are also several text boxes that
> > need to be saved off to the DB when a button is pressed. There are
> > several validates contained in the detailsviews. I want them to
> > validate only inside of their respective detailsviews, not the entire
> > page.
> >
> >>From my understanding of how validate groups work, you can set the
> > validatorgroup property of a button to be the same as those of the
> > validates and then you can have several different groups which will be
> > independent of each other.
> >
> > The problem that I am having is that I can not find the ValidationGroup
> > property for the insert link in the detailsview. This means that I have
> > to have values filled in both detailsviews to be able to submit one of
> > them.
> >
> > Do I need to generate the buttons myself and then set the
> > validationgroup property?
> >



Post Thread options