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

Help with GridView Nested in Repeater Item

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.ClientScript.RegisterForEventValidation(CType (item.Controls(1), GridView).UniqueID)

.. 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="bidInfoCell"><%#Eval("LiBidNum")%></td>
<td class="bidInfoCell"><%#Eval("LiBidDesc")%></td>
<td class="bidInfoCell"><%#Eval("LiSeqNum")%></td>
<td class="bidInfoCell"><%#Eval("LiSeqDesc")%></td>
<td class="bidInfoCell"><%#Eval("LiBidQty")%></td>
<td style="font-size:smaller;"><%#Eval("LiBidUOM")%></td>
</tr>
<tr>
<td colspan="6">
<asp:gridview ID="gvwPastSearch" runat="server" AutoGenerateColumns="false"
CssClass="tablegrid" Width="100%" OnRowCommand="gvwPastSearch_RowCommand" >
<RowStyle CssClass="TableItemRow" VerticalAlign="Top" Font-Size="small"></rowStyle>
<AlternatingrowStyle CssClass="TableAlternateRow" Font-Size="small"></AlternatingrowStyle>
<HeaderStyle CssClass="TableHeader" ForeColor="White" font-size="small"></HeaderStyle>
<PagerStyle BackColor="LightSlateGray" ForeColor="White" />
<Columns>
<asp:Boundfield DataField="LiBidCost" HeaderText="Cost"></asp:Boundfield>
<asp:Boundfield DataField="LiBidSell" HeaderText="Sell"></asp:Boundfield>
<asp:Boundfield DataField="LiItemBid" HeaderText="Bid?"></asp:Boundfield>
<asp:Templatefield HeaderText="Add/Remove/Move">
<ItemTemplate>
<asp:ImageButton ID="imgbtnPastRowCommand" runat="server"
ImageUrl="Images/arrow.gif" CommandName="AddItem" />
</ItemTemplate>
</asp:Templatefield>
</Columns>
</asp:gridview>
</td>
</tr>
</ItemTemplate>
<SeparatorTemplate>
<tr>
<td colspan="6">
<hr />
</td>
</tr>
</SeparatorTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
Mar 16 '08 #1
0 1517

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

Similar topics

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...
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: =?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...
2
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...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
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,...
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...

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.