?
Solved

Web Form: How Do You Create a Web Form Containing a FormView and Two Sub Forms

Posted on 2011-09-30
4
Medium Priority
?
168 Views
Last Modified: 2012-05-12
I have a web form in which I have a TABLE structure containing a FormView which displays a single row from a table. I have it coded such that I can switch between ItemTemplate (for viewing the data) and EditItemTemplate (for updating the data). This is working.

I also have on the same web page a separate TABLE structure into which I need to place something like a Repeater for displaying multiple rows of data. I chose the Repeater because I want to control the format of the data being displayed. Instead of displaying the row fields as columns, I want to display the fields one under the other with a separator between data rows. The Repeater seems to provide this capability, but, unlike the FormView, the Repeater only has the ItemTemplate. I need to be able to switch the view so that I can update the data.

How do you switch between View (readonly) and Edit within a Repeater? If it is possible, can you give a brief example or point me to a website that explains it?
0
Comment
Question by:Donna Kainer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 36903777
Are you looking for the capabilities of the DetailsView?
0
 

Accepted Solution

by:
Donna Kainer earned 0 total points
ID: 36919431
I found, in a Google search, a way to do most of what I need done (Edit and Delete) without the DetailsView. See http://sureshsharmaaspdotnet.wordpress.com/2008/05/12/edit-update-delete-in-repeater-in-aspnet/ for more information.

Using the above link I figured out how to get the Repeater to display the data from the database table with an Edit and Delete button on each row of data. However, there was no description of how to Add a record. I don't know how to get the Repeater to give me a blank row on request (I.E. I click an ADD button) so that I can type the data into the form and then add it to the database table.

Does anyone know how to do this?
0
 

Author Comment

by:Donna Kainer
ID: 36924765
My last comment should be a new question entry. I have created that entry. This can be closed.
0
 

Author Closing Comment

by:Donna Kainer
ID: 36947368
No one provided a better solution than the one I found via internet searches.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question