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. General Programming
  3. C#
  4. Custom Repeater or something else?

Custom Repeater or something else?

Scheduled Pinned Locked Moved C#
databasequestion
4 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
    methodincharge
    wrote on last edited by
    #1

    Relatively new to Web Apps (I've used them before, but was just reusing code, not creating). What I need is to display data read from a database in the following manner: Header Header2 Header3 Item1 Item4 Item7 Item2 Item5 Item8 Item3 Item6 So basically 8 items will be read from a database, and it will group the items based on the common Header property. When it has displayed 3 I want it to go to the next line. Any advice?

    C 1 Reply Last reply
    0
    • M methodincharge

      Relatively new to Web Apps (I've used them before, but was just reusing code, not creating). What I need is to display data read from a database in the following manner: Header Header2 Header3 Item1 Item4 Item7 Item2 Item5 Item8 Item3 Item6 So basically 8 items will be read from a database, and it will group the items based on the common Header property. When it has displayed 3 I want it to go to the next line. Any advice?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Yeah, a repeater will give you the control you need here. Although, if it were me, I'd make things easier by writing a stored procedure that created three columns so that the presentation tier didn't need to worry about anything but displaying it. Christian Graus - Microsoft MVP - C++

      M 1 Reply Last reply
      0
      • C Christian Graus

        Yeah, a repeater will give you the control you need here. Although, if it were me, I'd make things easier by writing a stored procedure that created three columns so that the presentation tier didn't need to worry about anything but displaying it. Christian Graus - Microsoft MVP - C++

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

        I just realize it too out the spacing I put in, so it may be a bit deceiving. What I am getting is 8 items from a DB with a Category attribute. So say the result would be something like: Name1 | Category1 Name2 | Category1 Name3 | Category2 Name4 | Category3 Name5 | Category3 And so on. Can I still do this with the repeater?

        C 1 Reply Last reply
        0
        • M methodincharge

          I just realize it too out the spacing I put in, so it may be a bit deceiving. What I am getting is 8 items from a DB with a Category attribute. So say the result would be something like: Name1 | Category1 Name2 | Category1 Name3 | Category2 Name4 | Category3 Name5 | Category3 And so on. Can I still do this with the repeater?

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Oh, I see. You can still do it with a repeater, you could do it by creating three tables, one for each category, and then binding the dataset to the repeater and accessing the three tables in the data items for the three rows. I still lean towards a stored procedure that returns one table with three rows, based on category. Then the presentation layer is easy, as it should be. Christian Graus - Microsoft MVP - C++

          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