Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7309061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T23:39:44+00:00 2026-05-28T23:39:44+00:00

I have a case of nested repeaters where a child repeater is nested in

  • 0

I have a case of nested repeaters where a child repeater is nested in the ItemTemplate of a parent repeater. The DataSource of the parent is a Dictionary<String, List<XYZ>>.
In the ItemDataBound of the parent Repeater I am using the full code:

     protected void rptParent_ItemDataBound(object sender, RepeaterItemEventArgs e)
     {
   if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
         {
      if (e.Item.DataItem is KeyValuePair<String, List<Object>>)
            {
                pair = (KeyValuePair<String, List<XYZ>>)e.Item.DataItem;
            }

            Repeater childRepeater = e.Item.FindControl("rptChild") as Repeater;

            //bind the child repeater.
            childRepeater.ItemDataBound += new RepeaterItemEventHandler(childRepeater_ItemDataBound);
            childRepeater.DataSource = pair.Value;
            childRepeater.DataBind();
    }
}

protected void childRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Footer)
        {
    //Access the Parent row's Key value

  }
    }

There are 2 questions:

  1. Can I use a hidden field while binding the parent and set it to the Key value and then retrieve the hidden field value in the child?

  2. Will the order of the events firing be as follows:

a. Parent_ItemDataBound for Row 1 of Dictionary<Key, List<XYZ>>

i. Child_ItemDataBound for each child row of Row 1 of parent repeater

ii. Child_ItemDataBound for Footer of child repeater

b. Parent_ItemDataBound for Row 2 of Dictionary<Key, List<XYZ>>

i. Child_ItemDataBound for each child row of Row 2 of parent repeater

ii. Child_ItemDataBound for Footer of child repeater

and so on. In other words, will the Parent_ItemDataBound be followed by Child_ItemDataBound events for each child row – with the cycle repeating?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T23:39:45+00:00Added an answer on May 28, 2026 at 11:39 pm

    Here are the answers to your question:

    1. Yes, you can access parent repeater item control

      var hfID = e.Item.NamingContainer.NamingContainer.FindControl(“hfID”) as HiddenField;

    2. the order is correct.

    Hope that helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a case where the child view sends notification to its parent view.
I have a nested Repeater control in the ItemTemplate of another Repeater. I want
I have a nested repeater control that displays a list of data, in my
I have a case that keeps coming up where I'm using a ListView or
I have a query which uses a complicated set of CASE statements, some nested,
I have a nested repeater Because of that no control in my code is
I have an odd sorting case I'm struggling to work out using LINQs GroupBy
I have seen many posts about using ActivityGroups for when you have nested activities
I have a pretty common case for nested routes, I feel like, that looks
Just in case it matters, I use ASP.NET 3.5 with VB.NET. I have nested

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.