Click here to Skip to main content
15,892,005 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Images not visible after publishing the web application Pin
5fingers19-Nov-10 2:59
5fingers19-Nov-10 2:59 
Questionusing nested repeater Pin
Dhyanga17-Nov-10 4:22
Dhyanga17-Nov-10 4:22 
AnswerRe: using nested repeater Pin
Not Active17-Nov-10 5:35
mentorNot Active17-Nov-10 5:35 
GeneralRe: using nested repeater Pin
Dhyanga17-Nov-10 5:58
Dhyanga17-Nov-10 5:58 
GeneralRe: using nested repeater Pin
Not Active17-Nov-10 6:59
mentorNot Active17-Nov-10 6:59 
GeneralRe: using nested repeater Pin
Dhyanga18-Nov-10 9:48
Dhyanga18-Nov-10 9:48 
GeneralRe: using nested repeater Pin
Not Active18-Nov-10 14:31
mentorNot Active18-Nov-10 14:31 
GeneralRe: using nested repeater [modified] Pin
Dhyanga19-Nov-10 2:59
Dhyanga19-Nov-10 2:59 
Ok. Let me show whatever I did so far.

I am using repeater and i am pulling data from the datatable which itself is pulling data from the string arrays. My datatable and the repeater code is like this:
DataTable dt = new DataTable();
dt.Columns.Add("ID");
dt.Columns.Add("Name");
dt.Columns.Add("Year");

foreach (string se in sec)
                       {
                           DataRow dr = dt.NewRow();
                           Name[] sf = Name.FindByID(se.ID);
                           dr["ID"] = se.ID;
                           dr["Name"] =  se.Name;
                           dr["Year"] = se.Term;
                           dt.Rows.Add(dr);
                       }

and the repeater code is like this:
DataView dv = dt.DefaultView;
rptParent.DataSource = dv;
rptParent.DataBind();

where rptParent denotes repeater.
The ascx code for repeater is like this:

<asp:Repeater ID = "rptParent" runat="server"
   onitemdatabound="rptParent_ItemDataBound"
   onitemcommand="rptParent_ItemCommand" >
       <ItemTemplate>
           <li>
               <asp:Label ID = "lbl_Year" runat="server" Text='<%# Eval("Year") %>'/>
           </li>
           <asp:Repeater ID = "rptChild" runat="server" >
               <ItemTemplate>
                   <ul>
                       <li>
                           <asp:LinkButton ID ="lnk_Name" runat="server" Text='<%# Eval("Name") %>' CommandName = "GoToPage" CommandArgument ='<%# Eval("ID") %>'/>
                       </li>
                   </ul>
               </ItemTemplate>
           </asp:Repeater>

       </ItemTemplate>

   </asp:Repeater>


And corresponding databound code is:
protected void rptParent_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            RepeaterItem item = e.Item;
           
                rptChild = (Repeater)item.FindControl("rptChild");
                DataRowView drv = (DataRowView)item.DataItem;
                rptChild.DataSource = drv.CreateChildView("rptParent");
                rptChild.DataBind();
           
        }


Now when i don't use rptChild repeater, all the data is showing . No problem with that. But when I use rptChild repeater as shown in above codes, data is not showing. I tried it using breakpoint too. No error but it is not showing any data count in rptParent repeater.I tried this using
rptParent.Items.Count
.

The count is 4 when i run the program without child repeater but it is 0 when i run the program with the child repeater. Can you tell me why this happens and how can I get out of this error ?
suchita
modified on Friday, November 19, 2010 9:23 AM

GeneralRe: using nested repeater Pin
Dhyanga19-Nov-10 4:22
Dhyanga19-Nov-10 4:22 
GeneralRe: using nested repeater Pin
Not Active19-Nov-10 10:42
mentorNot Active19-Nov-10 10:42 
GeneralRe: using nested repeater Pin
Dhyanga23-Nov-10 5:19
Dhyanga23-Nov-10 5:19 
GeneralRe: using nested repeater Pin
Not Active23-Nov-10 5:28
mentorNot Active23-Nov-10 5:28 
QuestionHyper Reference Tag from SQL Procedure [modified] Pin
Satish_S16-Nov-10 23:51
Satish_S16-Nov-10 23:51 
AnswerRe: Hyper Reference Tag from SQL Procedure Pin
Satish_S17-Nov-10 22:32
Satish_S17-Nov-10 22:32 
QuestionInvalid typecast with checkbox checked attibute using DataBinder.Eval Pin
grewin16-Nov-10 23:45
grewin16-Nov-10 23:45 
AnswerRe: Invalid typecast with checkbox checked attibute using DataBinder.Eval Pin
C#Coudou26-Nov-10 16:59
C#Coudou26-Nov-10 16:59 
QuestionVS2008 SOAP Client - losing Session problem Pin
anbam16-Nov-10 22:34
anbam16-Nov-10 22:34 
Questionparent/child window Pin
C#Coudou16-Nov-10 21:00
C#Coudou16-Nov-10 21:00 
QuestionFileIOPermission exception with sharpPDF library writing PDF to child dir. Pin
David Hovey16-Nov-10 16:20
David Hovey16-Nov-10 16:20 
AnswerRe: FileIOPermission exception with sharpPDF library writing PDF to child dir. Pin
Eddy Vluggen17-Nov-10 0:16
professionalEddy Vluggen17-Nov-10 0:16 
GeneralRe: FileIOPermission exception with sharpPDF library writing PDF to child dir. Pin
David Hovey17-Nov-10 1:46
David Hovey17-Nov-10 1:46 
GeneralRe: FileIOPermission exception with sharpPDF library writing PDF to child dir. Pin
Eddy Vluggen17-Nov-10 4:53
professionalEddy Vluggen17-Nov-10 4:53 
AnswerRe: FileIOPermission exception with sharpPDF library writing PDF to child dir. Pin
T M Gray17-Nov-10 9:27
T M Gray17-Nov-10 9:27 
GeneralRe: FileIOPermission exception with sharpPDF library writing PDF to child dir. Pin
David Hovey17-Nov-10 17:34
David Hovey17-Nov-10 17:34 
Questionlink button under repeater Pin
Dhyanga16-Nov-10 7:14
Dhyanga16-Nov-10 7:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.