473,396 Members | 1,929 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.

Using the output of repeater as a datasource for a nested GridView

Hello,
I am trying to use a GridView nested within a repeater to group items
together.

To do this I would like to use the output of the repeater control
(int_pk_parent_definition_id) to be the SQL parameter for the stored
procedure which is the datasource for the GridView.

Any ideas? Help would be much appreciated. I've included what I've
done so far below but it doesn't work because
"int_fk_definition_parent_id" isn't a property of Repeater2...

Thanks in advance,
Kieran

<asp:Repeater ID="Repeater2" runat="server"
DataSourceID="ParentDefinitions" >
<ItemTemplate>
<%# Eval("str_definition_name") %>
<br />
<asp:HiddenField
ID="hfldParentDefID" runat="server" Value="1"/>

<asp:GridView ID="GridView1"
runat="server" AllowPaging="False" AllowSorting="True"
AutoGenerateColumns="False" DataKeyNames="int_pk_defintion_id"
DataSourceID="ChildDefinitions">

<asp:BoundField DataField="dt_created"
HeaderStyle-HorizontalAlign=Left HeaderText="Datecreated"
SortExpression="dt_created" />

</asp:GridView>

</ItemTemplate>
</asp:Repeater>

<asp:SqlDataSource
ID="ParentDefinitions" runat="server" ConnectionString="<%$
ConnectionStrings:CRN_CRMConnectionString %>"

SelectCommand="p_defParentDefinitionListAll"
SelectCommandType="StoredProcedure"></asp:SqlDataSource>

<asp:SqlDataSource ID="ChildDefinitions"
runat="server" ConnectionString="<%$
ConnectionStrings:CRN_CRMConnectionString %>"

SelectCommand="p_p_defChildDefinitionListForParent "
SelectCommandType="StoredProcedure">
<asp:ControlParameter
ControlID="Repeater2" Name="int_fk_definition_parent_id"

PropertyName="int_pk_definition_parent_id" Type="Int32" />
</asp:SqlDataSource>

Dec 10 '06 #1
0 2263

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

Similar topics

3
by: Tommy | last post by:
I have been working on getting nested repeaters to work for several days. When I add a repeater inside my item template i cannot see it in my code and can't set the datasource for it, etc, thus...
0
by: mark | last post by:
My problem is I need to have a "nested" repeater. I have an array which I load into a hashtable - that part works great. I can setup the second repeater to work just fine, as long as it's not...
2
by: Ed Allan | last post by:
I have extended the example at http://support.microsoft.com/default.aspx?scid=kb;EN- US;306154 to build a webform page with 3 layers of nested Repeaters (ie. parent, child and grandchild). I...
3
by: Eirik Eldorsen | last post by:
Im trying to make a nested repeater with 3 levels. I've successfully created a nested repeater with 2 levels, but when adding the 3rd level I get an InvalidCastException. What am I doing wrong? ...
2
by: mark | last post by:
(not sure if this is the correct group) My problem is I need to have a "nested" repeater. I have an array which I load into a hashtable - that part works great. I can setup the second repeater...
1
by: Big Charles | last post by:
I have inner Repeater2 inside Repeater1. Problem is that I can't show the data of Repeater2 properly What is shown on Screen is: Line_1 Of Repeater_2 Line_2 Of Repeater_2 Line_3 Of...
0
by: wardemon | last post by:
Hi All, I was just wondering if the following is possible? To bind a GridView's datasource to the Repeater's current DataRow value. I tried creating a dataset, then load the datarowview inside...
1
by: LLM | last post by:
I am nesting repeater in a datalist. I have done the relation thing in VB but now I'm trying it in C#. <asp:Repeater id="rptCompetitor" runat="server" DataSource='<%#...
2
by: ASF | last post by:
Hey all, I have a gridview which pulls from a BLL which pulls from a DAL (an .XSD file). Each row on that gridview has a nested repeater which pulls from another table. The code which populates...
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
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:
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
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
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.