Help with hyperlinking repeater to datagrid on same page

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2006
Posts: 1
Reputation: sougataroy is an unknown quantity at this point 
Solved Threads: 0
sougataroy sougataroy is offline Offline
Newbie Poster

Help with hyperlinking repeater to datagrid on same page

 
0
  #1
Dec 6th, 2006
I have a Repeater control (myrepeater) and a datagrid both bound to the same datasource:

dgMaster.DataSource = GetAuthors()
dgMaster.DataBind()
myRepeater.DataSource = GetAuthors()
myRepeater.DataBind()

Here is how it is setup in the repeater:
<asp:Repeater id="myRepeater" runat="server">
<HeaderTemplate>
<tr>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td width="30%"></td>
<td><%# Container.DataItem("firstdate") %></td>
<td width="30%"><asp:HyperLink ID="Hyperlink1" Runat="server" NavigateUrl='<%# "AMAuxMeetings.aspx?Seconddate=" & Server.UrlEncode(Container.DataItem("firstdate")) %>'>1</asp:HyperLink></td>
</tr>

</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater>

I tried to hypelink the Hyperlink1 in Repeater to the datagird:

<asp:datagrid id="dgMaster" runat="server" Width="100%" ShowFooter="False" HorizontalAlign="Center"
ShowHeader="false" autogeneratecolumns="False" GridLines="None">
<FooterStyle Font-Size="12pt" Font-Bold="True" HorizontalAlign="Left"></FooterStyle>
<ItemStyle VerticalAlign="Top"></ItemStyle>
<HeaderStyle Font-Size="14pt" Font-Bold="True"></HeaderStyle>
<Columns>
<asp:TemplateColumn HeaderText="Meeting Details">
<ItemTemplate>
<FONT size="2"><b>
<%# DataBinder.Eval(Container.DataItem, "firstdate") %>
</b></FONT>

I am totally confused about how to do that. Please help me
Last edited by sougataroy; Dec 6th, 2006 at 3:06 pm.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC