Custom Repeater or something else?
-
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?
-
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?
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++
-
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++
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?
-
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?
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++