473,748 Members | 4,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Are Nested ADO Controls possible?

Can I put a repeater inside a FormView?
Can I put a repeater inside that repeater?

If so, what happens when the FormView.Mode is "Edit?" When they click the
EDIT button is my repeater data also saved? Or do I have to code that
manually?

Thanks in advance,
Scott
Feb 14 '06 #1
3 1881
Hi Scott,

Certainly, you can put a repeater inside a repeater. Here is a sample:
http://www.societopia.net/Samples/Re...Hierarchy.aspx

You can put a repeater inside any of the templates within a FormView, e.g.

<asp:FormView ID="FormView1" runat="server" >
<ItemTemplate >
<asp:Repeater runat="server" id="DispalyRepe ater">
<%-- the implementation of the repater for display
would include ItemTemplates--%>
</asp:Repeater>
</ItemTemplate>
<EditItemTempla te>
<asp:Repeater runat="server" id="EditableRep eater">
<%-- the implementation of the repater for editing
would include EditItemTemplat es--%>
</asp:Repeater>
</EditItemTemplat e>
</asp:FormView>

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Scott at Cedar Creek" wrote:
Can I put a repeater inside a FormView?
Can I put a repeater inside that repeater?

If so, what happens when the FormView.Mode is "Edit?" When they click the
EDIT button is my repeater data also saved? Or do I have to code that
manually?

Thanks in advance,
Scott

Feb 14 '06 #2
Thanks...I understand what you're saying, but I'm trying to understand WHY.
So, you're saying that the repeater items (if updated) will automatically get
written to the table BECAUSE the repeater is located inside the EditTemplate?

If that's the case, life is going to be sweet!
Feb 14 '06 #3
Hi Scott,

Each nested control (i.e. the repeater within the formView) would have to
program its own update functions or the FormView would have to do that for
it. But if you only update the EditTemplate of the FormView without any
further processing of the child control then the child control would not
automatically update any data.

For example if you display a repeater within the EditItemTemplat e that has
textBoxes for the user to enter data, you might want to process these entries
during the FormView.ItemUp dating event like this:

Protected Sub FormView1_ItemU pdating(ByVal sender as object, ByVal e as
FormViewUpdateE ventArgs)
Dim repeater1 as Repeater= Ctype(Ctype(sen der,
FormView).FindC ontrol("repeate r1"), Repeater)
‘loop through the Repeater.Items collection to find the controls
‘within each RepeaterItem and then update the database

End Sub

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Scott at Cedar Creek" wrote:
Thanks...I understand what you're saying, but I'm trying to understand WHY.
So, you're saying that the repeater items (if updated) will automatically get
written to the table BECAUSE the repeater is located inside the EditTemplate?

If that's the case, life is going to be sweet!

Feb 14 '06 #4

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

Similar topics

6
2568
by: Andy Baker | last post by:
Hi there, I'm learning Python at the moment and trying to grok the thinking behind it's scoping and nesting rules. I was googling for nested functions and found this Guido quote: (http://www.python.org/search/hypermail/python-1993/0343.html) "This is because nested function definitions don't have access to the local variables of the surrounding block -- only to the globals of the
3
1957
by: Guadala Harry | last post by:
I have this scenario: ASPX Page dynamically loads userControl1 - which in turn dynamically loads userControl2. UserControl2 contains a TextBox Web Server control. When a user clicks a button in the ASPX page (not in either user control), a Postback occurs during which I'd like to retrieve the Text property value of the TextBox control. I have plenty of examples to work from that show how to retrieve a property value of a user control...
5
5332
by: ~~~ .NET Ed ~~~ | last post by:
Hi, As you all know when an ASP.NET web form is created that will include web controls and such, it contains a FORM that that identifies the web form and its containing controls. Well, I have a web form who has several other (user & custom) controls, these are enclosed within the standard FORM tag. Additionally *some* of these user controls are actually forms as well. This results into nested Forms.
1
1300
by: humbleFunGuy | last post by:
What does nested controls mean in .Net? Any help is appreciated. Thanks, fanzi
2
1997
by: Pj | last post by:
hi, i am new to vb.net and i am stuck at a particular point in my project. i have two nested classes (because vb.net does NOT allow multiple inheritance) ----------------------------------------- Class DrawingCanvas Inherit System.Windows.Forms.Form
20
10826
by: Robert | last post by:
Need some help to stop me going around in circles on this one.... Have a nested subform (subform2) which simulates a continuous form for the record on the parent subform. Subform2 has rows of either an option button plus two text fields or a checkbox plus two text fields Am wanting to save the user entries into an underlying table. Tag property for each option button, check box or text field has the value of the key
3
19342
by: Martin | last post by:
Hi, I have a very frustrating problem that I have researched for countless hours to no avail. There are many posts asking very similar things, however none usefull in my situation. I am using VS 2005 (ASP 2.0) and VB .NET. I have a page with a datalist, a gridview and then other data controls, nested in that order. This all works great, and produces a nice looking page, but I cannot for the life of me figure out how to reference
2
2412
by: brad | last post by:
Group, I'm using Visual Studio 2003 to create an ASP.NET 1.1 project which contains nested server user controls in order to create a tree-like hierarchy. The tree is a sort of question and answer dialog. The user answers a question, and the next subquestion appears (using dynamic html display:none|block) depending on his answer.
1
1872
by: andrew.douglas11 | last post by:
Hello all, Is it possible to share controls inside a child repeater? Here's the situation: I have a web page that needs to display data grouped by A, and alternatively by B (only one grouping displayed at a time through Panel.Visible). A and B both share common child data: C. I have 2 parent repeaters corresponding to A and B, and each of those repeaters have 1 child repeater containing child data C. Presently, my code handles...
5
4115
by: John Kotuby | last post by:
Hi all, After more than a year programming with ASP.NET 2.0 and VB I am still finding it difficult to leave some habits from classic ASP behind. this is particularly true with cross-page posting. My site uses Master pages and user controls. On an Advanced Search page I have numerous entry boxes and listboxes (keywords, categories, etc.) which are primarily standard HTML. I post this page to a different page which lists results and...
0
8991
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9544
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8243
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2783
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.