Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to find all Created Items in a Repeater

How to find all Created Items in a Repeater

Scheduled Pinned Locked Moved ASP.NET
questioncsharphtmlcsshelp
9 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Muc_
    wrote on last edited by
    #1

    Hi, maybe somebody can help me further, I have a Repeater [Group Repeater], who created a group and in the RepeaterGroup is another Repeater [Skill Repeater], repeats many of the skills of the Group. So how can I find out whether two groups were already created, to get them and put them in other DIV and add CSS-Style? should look like this Click here

    A 1 Reply Last reply
    0
    • M Muc_

      Hi, maybe somebody can help me further, I have a Repeater [Group Repeater], who created a group and in the RepeaterGroup is another Repeater [Skill Repeater], repeats many of the skills of the Group. So how can I find out whether two groups were already created, to get them and put them in other DIV and add CSS-Style? should look like this Click here

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      Why dont you increase a counter on ItemDataBound of the repeater ? I think this would be the easiest way to do this.

      Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


      Visit My Website-->**

      www.abhisheksur.com

      M 1 Reply Last reply
      0
      • A Abhishek Sur

        Why dont you increase a counter on ItemDataBound of the repeater ? I think this would be the easiest way to do this.

        Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


        Visit My Website-->**

        www.abhisheksur.com

        M Offline
        M Offline
        Muc_
        wrote on last edited by
        #3

        Currently, there are a total of 7 groups. I think you should put a counter and if a number is unbarred then DIV to left otherwise DIV to the right?

        A 1 Reply Last reply
        0
        • M Muc_

          Currently, there are a total of 7 groups. I think you should put a counter and if a number is unbarred then DIV to left otherwise DIV to the right?

          A Offline
          A Offline
          Abhishek Sur
          wrote on last edited by
          #4

          Whatever the logic suits you... apply any logic. Just handle the counter from two ItemDataBound events of both the repeaters. Also make sure you constraint away the ItemTypes for Header and Footer templates. :thumbsup:

          Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


          Visit My Website-->**

          www.abhisheksur.com

          M 1 Reply Last reply
          0
          • A Abhishek Sur

            Whatever the logic suits you... apply any logic. Just handle the counter from two ItemDataBound events of both the repeaters. Also make sure you constraint away the ItemTypes for Header and Footer templates. :thumbsup:

            Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


            Visit My Website-->**

            www.abhisheksur.com

            M Offline
            M Offline
            Muc_
            wrote on last edited by
            #5

            I'm sorry do not understand

            A 1 Reply Last reply
            0
            • M Muc_

              I'm sorry do not understand

              A Offline
              A Offline
              Abhishek Sur
              wrote on last edited by
              #6

              Check this, you will get the idea : http://www.codeguru.com/csharp/.net/net_asp/tutorials/article.php/c12065[^] :thumbsup:

              Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


              Visit My Website-->**

              www.abhisheksur.com

              M 1 Reply Last reply
              0
              • A Abhishek Sur

                Check this, you will get the idea : http://www.codeguru.com/csharp/.net/net_asp/tutorials/article.php/c12065[^] :thumbsup:

                Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


                Visit My Website-->**

                www.abhisheksur.com

                M Offline
                M Offline
                Muc_
                wrote on last edited by
                #7

                I have read it I mean create outside the function the counter. if the counter has reached 2, then I'll get the created controls and put them into the new DIV with CSS... Thats my GroupRepeater ItemdataBound protected virtual void RepeaterGroup_ItemdataBound(object sender, RepeaterItemEventArgs e) { MuMSkillGroup group = (MuMSkillGroup)e.Item.DataItem; SkillGroupControl currentGoup = (SkillGroupControl)e.Item.FindControl("Skillgroup"); currentGoup.CurrentGroupName = group.SkillGroupName; currentGoup.IsMatrix = false; currentGoup.BindAsMyskillpage = true; }

                M 1 Reply Last reply
                0
                • M Muc_

                  I have read it I mean create outside the function the counter. if the counter has reached 2, then I'll get the created controls and put them into the new DIV with CSS... Thats my GroupRepeater ItemdataBound protected virtual void RepeaterGroup_ItemdataBound(object sender, RepeaterItemEventArgs e) { MuMSkillGroup group = (MuMSkillGroup)e.Item.DataItem; SkillGroupControl currentGoup = (SkillGroupControl)e.Item.FindControl("Skillgroup"); currentGoup.CurrentGroupName = group.SkillGroupName; currentGoup.IsMatrix = false; currentGoup.BindAsMyskillpage = true; }

                  M Offline
                  M Offline
                  Muc_
                  wrote on last edited by
                  #8

                  if (CountGroup == 6) { Repeater getGroupRepeater = (Repeater)sender; foreach (RepeaterItem rptItem in getGroupRepeater.Controls) { foreach (Control ctrl in rptItem.Controls) { if (ctrl is Panel) { Panel panelGlobalContainerBox = (Panel)ctrl; if (countItemdataBound) { panelGlobalContainerBox.CssClass = "content_left"; //panelGlobalContainerBox.BackColor = System.Drawing.Color.Red; countItemdataBound = false; } else { panelGlobalContainerBox.CssClass = "content_right"; //panelGlobalContainerBox.BackColor = System.Drawing.Color.Green; countItemdataBound = true; } } } } } THX Abhishek Sur for your Time its solved now

                  A 1 Reply Last reply
                  0
                  • M Muc_

                    if (CountGroup == 6) { Repeater getGroupRepeater = (Repeater)sender; foreach (RepeaterItem rptItem in getGroupRepeater.Controls) { foreach (Control ctrl in rptItem.Controls) { if (ctrl is Panel) { Panel panelGlobalContainerBox = (Panel)ctrl; if (countItemdataBound) { panelGlobalContainerBox.CssClass = "content_left"; //panelGlobalContainerBox.BackColor = System.Drawing.Color.Red; countItemdataBound = false; } else { panelGlobalContainerBox.CssClass = "content_right"; //panelGlobalContainerBox.BackColor = System.Drawing.Color.Green; countItemdataBound = true; } } } } } THX Abhishek Sur for your Time its solved now

                    A Offline
                    A Offline
                    Abhishek Sur
                    wrote on last edited by
                    #9

                    You are most welcome my friend. :thumbsup:

                    Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


                    Visit My Website-->**

                    www.abhisheksur.com

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups