Click here to Skip to main content
12,352,739 members (59,569 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB 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")%>'>
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
rajrprk899
v4
Comments
01010RAJ 14-Dec-12 7:08am
   
ya,paste ur code,I m not getting u.
rajrprk 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160621.1 | Last Updated 14 Dec 2012
Copyright © CodeProject, 1999-2016
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