473,621 Members | 2,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with GridView Nested in Repeater Item

1 New Member
I really hope someone can help me with this because it's really driving me crazy. I need to dynamically display multiple data tables on a page so I am using a Repeater to do so and in the ItemTemplate of the Repeater I am adding a Gridview control. One of the columns of the GridView control is a TemplateColumn that contains an ImageButton.

The tricky thing is that I am using .NET 2.0 and it seems that I have to register this control (I'm not sure if it's the gridview I have to register or the actual imagebutton within the gridview) for event validation.

I've tried overriding the Render method on the page and registering the control as follows:

Page.ClientScri pt.RegisterForE ventValidation( CType(item.Cont rols(1), GridView).Uniqu eID)

.. with no luck.

Can someone please help me, this is driving me crazy. I'm at my wits end.

Here is my Repeater mark up:

<asp:Repeater ID="rptMain" runat="server" >
<HeaderTemplate >
<table width="90%">
<tr>
<th align="center"> Bid #</th>
<th align="center"> Bid Name</th>
<th align="center"> Sequence #</th>
<th align="center"> Sequence Desc</th>
<th align="center"> Bid Qty</th>
<th align="center"> Bid UOM</th>
</tr>
</HeaderTemplate>
<ItemTemplate >
<tr>
<td class="bidInfoC ell"><%#Eval("L iBidNum")%></td>
<td class="bidInfoC ell"><%#Eval("L iBidDesc")%></td>
<td class="bidInfoC ell"><%#Eval("L iSeqNum")%></td>
<td class="bidInfoC ell"><%#Eval("L iSeqDesc")%></td>
<td class="bidInfoC ell"><%#Eval("L iBidQty")%></td>
<td style="font-size:smaller;"> <%#Eval("LiBidU OM")%></td>
</tr>
<tr>
<td colspan="6">
<asp:gridview ID="gvwPastSear ch" runat="server" AutoGenerateCol umns="false"
CssClass="table grid" Width="100%" OnRowCommand="g vwPastSearch_Ro wCommand" >
<RowStyle CssClass="Table ItemRow" VerticalAlign=" Top" Font-Size="small"></rowStyle>
<Alternatingrow Style CssClass="Table AlternateRow" Font-Size="small"></AlternatingrowS tyle>
<HeaderStyle CssClass="Table Header" ForeColor="Whit e" font-size="small"></HeaderStyle>
<PagerStyle BackColor="Ligh tSlateGray" ForeColor="Whit e" />
<Columns>
<asp:Boundfie ld DataField="LiBi dCost" HeaderText="Cos t"></asp:Boundfield>
<asp:Boundfie ld DataField="LiBi dSell" HeaderText="Sel l"></asp:Boundfield>
<asp:Boundfie ld DataField="LiIt emBid" HeaderText="Bid ?"></asp:Boundfield>
<asp:Templatefi eld HeaderText="Add/Remove/Move">
<ItemTemplate >
<asp:ImageButto n ID="imgbtnPastR owCommand" runat="server"
ImageUrl="Image s/arrow.gif" CommandName="Ad dItem" />
</ItemTemplate>
</asp:Templatefie ld>
</Columns>
</asp:gridview>
</td>
</tr>
</ItemTemplate>
<SeparatorTempl ate>
<tr>
<td colspan="6">
<hr />
</td>
</tr>
</SeparatorTempla te>
<FooterTemplate >
</table>
</FooterTemplate>
</asp:Repeater>
Mar 16 '08 #1
0 1536

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1757
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 nested within the first repeater. If it is nested within the first repeater, I don't get any data. If I put the second repeater as a separate repeater, not nested, it works fine. Here's my actual code, showing data pulled from the array within a...
3
19335
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
3803
by: =?Utf-8?B?SHV0dHk=?= | last post by:
I have searched the net but have been unable to find a solution to subtotaling in a gridview. I have a gridview that is bounded to sqldatasource where I would like to subtotal rows throughout the gridview based on column value "Type". I am using VB.NET. Thanks. -- Hutty
2
3569
by: Ralf | last post by:
I have a custome request to print a gridview with lots of columns, 31 to be exact. I know how to print out a gridview, done it already for a GV with 6 columns. But, this GV is very wide and will not fit on a page. I looked into using a repeater, but couldn't figure it out. Tried datalists, no luck. Does anybody have an idea of how I can output the data where it will print. It doesn't have to output into a gridview, I just need it...
0
8213
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
8653
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...
0
8597
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8306
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
7127
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
5554
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();...
0
4065
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2587
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.