473,396 Members | 1,764 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,396 software developers and data experts.

Validation with DetailView

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?

Aug 30 '06 #1
2 1824
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 }=-
bm****@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?
Aug 30 '06 #2
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 }=-
bm****@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?
Aug 30 '06 #3

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

Similar topics

0
by: Kha Tran | last post by:
Please give me a sample of using xpo objectdatasource gridview detailview for select,insert,update and delete Thanks -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
0
by: Mike | last post by:
I have a detailview, with several template columns in it. It's setup so that a user views info from a datagrid, and if they want to add another row, they click a button. The button causes a...
1
by: Luqman | last post by:
The detailview control is combination of textboxes and labels, while detailview is in edit mode, how can I change the textbox value through code ? For example: My detailView has following...
0
by: Luqman | last post by:
I have used a single objectDataSource for GridView and DetailView, and when I load the page, the GridView shows all the entries of Invoice, and DetailView shows the 1st entry of Invoice, thats all...
0
by: =?Utf-8?B?THVib21pcg==?= | last post by:
Hi, I have a GridView and Dataview controls. If user clicks on a row in GridView, the details will be shown in DetailView. 1/ I want to show in DetalView only details field - without column...
0
by: Deepak Palkar | last post by:
Hi I have Gridview and DetailView both on one page. I am showing the list in the Gridview and the particular record in DetailView. the problem is When i EDIT on the DetailView and try to UPDATE...
2
by: Luqman | last post by:
Hi, Any Idea how to Display Todays Date in DetailView Template Field while Inserting ? For example: When I click on New Button of DetailView Control, I need to display Today's Date in a...
0
by: LamSoft | last post by:
By Double clicking the object detailview, it will auto make a sub-procedure called XXXXX_Selecting, however I want a sub-procedure to be called while the detailview is being updated, so that i add...
0
by: LamSoft | last post by:
In the object of detailView, i added a function to check the values during itemUpdating, the source is: protected void test2(object sender, DetailsViewUpdateEventArgs e) { foreach...
1
by: Ganesh | last post by:
Hi There, I use detailView to edit, insert and delete data. It gets value from datagrid.selectedvalue. How can i insert a record initially. If there is not any record in the grid, still i would...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...

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.