| | |
Help with hyperlinking repeater to datagrid on same page
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2006
Posts: 1
Reputation:
Solved Threads: 0
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
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.
![]() |
Similar Threads
- Please help me :"login form use drag and drop toolbox" ! (C#)
- How to print the items in a datagrid in ASP .Net (ASP.NET)
- GetSelectedIndex Datagrid? Dropdownlist (ASP.NET)
- Repeater,datalist, datagrid (ASP.NET)
- Configuration Error (ASP.NET)
- Datagrid inside repeater-simple reference problem (ASP.NET)
- DataGrid: Edit mode, the index of a dropdownlist does not start at the right Value (ASP.NET)
- Nest Datagrids (ASP.NET)
- Printing the datagrid control (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Forum?
- Next Thread: connection string
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net box browser button c# c#gridviewcolumn checkbox click commonfunctions compatible confirmationcodegeneration content contenttype courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dynamically edit expose fileuploader fill flash formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox login microsoft mono mouse mssql multistepregistration news numerical objects opera panelmasterpagebuttoncontrols radio ratings redirect registration relationaldatabases reportemail rotatepage save schoolproject search security serializesmo.table silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers





