Web Form: How Do You Create a Web Form Containing a FormView and Two Sub Forms
Posted on 2011-09-30
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?