![]() |
|
|
|
#1 |
|
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? bmayer@mnepilepsy.net |
|
|
|
|
#2 |
|
Posts: n/a
|
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 }=- 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? > Kyle K. |
|
|
|
#3 |
|
Posts: n/a
|
Perfect! Thank you.
Kyle K. wrote: > 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 }=- > > > 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? > > bmayer@mnepilepsy.net |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to give email validation inside a textbox in C# windows application(VS 2005)? | Vayalumkal | Software | 1 | 10-14-2008 07:28 PM |
| C#, Server validation | paul_singh | Software | 0 | 09-23-2008 02:34 PM |
| on submit validation with Master Page in ASP.net 2.0 | dipesh10 | Software | 0 | 06-27-2007 02:33 PM |
| How we can do validation with velocity macro tags | HemantS | Software | 0 | 06-12-2007 04:58 AM |