473,396 Members | 2,010 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.

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 1865
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="DispalyRepeater">
<%-- the implementation of the repater for display
would include ItemTemplates--%>
</asp:Repeater>
</ItemTemplate>
<EditItemTemplate>
<asp:Repeater runat="server" id="EditableRepeater">
<%-- the implementation of the repater for editing
would include EditItemTemplates--%>
</asp:Repeater>
</EditItemTemplate>
</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 EditItemTemplate that has
textBoxes for the user to enter data, you might want to process these entries
during the FormView.ItemUpdating event like this:

Protected Sub FormView1_ItemUpdating(ByVal sender as object, ByVal e as
FormViewUpdateEventArgs)
Dim repeater1 as Repeater= Ctype(Ctype(sender,
FormView).FindControl("repeater1"), 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
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:...
3
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...
5
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...
1
by: humbleFunGuy | last post by:
What does nested controls mean in .Net? Any help is appreciated. Thanks, fanzi
2
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) ...
20
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...
3
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...
2
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...
1
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...
5
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....
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
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...
0
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,...

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.