Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
I have a repeater control.
I will return maximum 50 rows with various data, In this i want to use datagrid control inside repeater control that to based on repeater control value. How can i do this. Can post solution for this will be more helpful.
 
ASPX Code;
<asp:Repeater ID="RepDetails" runat="server" onitemdatabound="RepDetails_ItemDataBound">
<itemtemplate>
<table class="worksheet-frm" id="tblMain" width="100%"  runat="server">
<table><tbody><tr>
<td style="FONT-SIZE: 10pt">Case#</td>
<td style="BORDER-BOTTOM-WIDTH: 0px">
<asp:textbox id="txtCasenumber" runat="server" CssClass="input" Width="150px" Text='<%# DataBinder.Eval(Container.DataItem,"CaseNumber")%>'>
</td>
<td style="FONT-SIZE: 10pt">Date Appointment Set</td>
<td>
<asp:textbox id="txtDateAppointmentSet" runat="server" CssClass="input" Width="150px" Text='<%# DataBinder.Eval(Container.DataItem,"DateAppointmentSet")%>'>
</td>
<table><tbody><tr>
<td style="BORDER-TOP: #000066 3px solid" colspan="3">
<asp:DataGrid ID="grdJouranl" Runat="server"  AutoGenerateColumns="True" ShowHeader="True" AllowPaging="True"></td>
<td style="BORDER-TOP: #000066 3px solid" colspan="3">
<asp:DataGrid ID="grdOtherLeads" Runat="server" AutoGenerateColumns="True" ShowHeader="True" AllowPaging="True"></td>
</tr></tbody></table>
 
</tr></tbody></table></itemtemplate>
Code Behind
dt = oDM.GetDataSet("dbo.Select").Tables(0)
RepDetails.DataSource = dt
RepDetails.DataBind()
Repeater will show more then 20 rows. Here i want to load the datagrid based on txtCasenumber for every row of repeater control.
 
Thanks in advance
Posted 14-Dec-12 0:51am
rajrprk643
v4
Comments
01010RAJ at 14-Dec-12 7:08am
   
ya,paste ur code,I m not getting u.
rajrprk at 14-Dec-12 7:39am
   
Pasted code can you look at it please

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You are going to have to tie into the ItemDataBound event of the Repeater then use FindControl to find your datagrid and then just bind it like you normally would.
 
Not an exact answer but the concept should be exactly the same, just instead of nested repeaters you're using a nested DataGrid.
Nested and Grouped Repeaters[^]
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 6,656
1 Sergey Alexandrovich Kryukov 6,400
2 CPallini 5,240
3 George Jonsson 3,584
4 Gihan Liyanage 2,625


Advertise | Privacy | Mobile
Web01 | 2.8.140921.1 | Last Updated 14 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100