| | |
Help with hyperlinking repeater to datagrid on same page
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
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 3.5 activexcontrol ajax alltypeofvideos asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# c#gridviewcolumn cac checkbox class commonfunctions compatible confirmationcodegeneration content contenttype countryselector courier dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deployment development dgv dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv formatdecimal forms formview gridview gudi homeedition iis javascript jquery listbox menu microsoft mouse mssql nameisnotdeclared news opera panelmasterpagebuttoncontrols problem redirect registration relationaldatabases reportemail schoolproject security serializesmo.table sessionvariables silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl textbox tracking treeview unauthorized validatedate validation vb.net video videos vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webdevelopment webprogramming webservice youareanotmemberofthedebuggerusers





