473,320 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Grouping product list results in repeater

All,

I'm looking for a way of generating a grouping in a repeater (or other
control). Instaed of describing everything here, just look at this link and
you can see how I did it in classic asp 3.0 including source code and
SQL-script (SQL Server 2000).

http://www.rodin.se/gruppering.asp

You'll see the result with grouped products. Is there a way of doing the
same thing in ASP.NET (I'm writing everything in VB, not C#) with repeater,
datagrid or datalist???

All help is very appreciated.

Thanks in advance,
Fredrik
Nov 18 '05 #1
3 2369
I have done something like that with a repeater control before. IT may not be the best way but it worked for me

in my code behind page I made this
Public Function CheckForNewGroup(byval textToCheck) as strin
'--- Do the check here and return a <Br><b>new title</b
'--- or return the next result plai
End Functio

In the ASPX page I used this in the repeater control (under ItemTemplate and Alternating Item Template) <%# CheckForNewGroup(Databinder.eval(container.dataite m, "myData") %

-Mik
Nov 18 '05 #2
Fredrik Rodin wrote:
All,

I'm looking for a way of generating a grouping in a repeater (or other

You'll see the result with grouped products. Is there a way of doing the
same thing in ASP.NET (I'm writing everything in VB, not C#) with repeater,
datagrid or datalist???


I didn't look closely at your data, or if it is the same layout, but
it's easiest if you have mutliple tables in your datasource, one with
the list of groups, the other with the individual items.

I normally embed 'repeating controls' to accomplish this. I usually
have a datalist inside a datalist, or a repeater inside a datalist, etc.
The particular ones just depend on your layout needed.

Basically, you bind the outer control (let's say a repeater) to your
list of group names, and then you set the DataSource of the inner
control (let's say another repeater) to the list of individual items
filtered by the current group name...it's hard to explain, check out the
Reports Starter Kit, they do this in the Crosstab report, here's a
direct link to the source code of their main page:

http://asp.net/ReportsStarterKit/Sou...rosstab&rows=5
--
Craig Deelsnyder
Microsoft MVP - ASP.NET
Nov 18 '05 #3
dang, second time today my newsreader doesn't show replies, but i come
back in and someone already answered your question before my post.
sorry, hope you solved your problem....

--
Craig Deelsnyder
Microsoft MVP - ASP.NET
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Debbie Davis | last post by:
Hi there, SQL 2000 I have the following query: SELECT sponsor, COUNT(sponsor) * 2 AS total FROM Referrals GROUP BY sponsor Works great, returns the sponsor and the total * 2 of their...
2
by: Tristan Miller | last post by:
Greetings. I have a question involving sorting and grouping output using XSLT. I am trying to produce a publication list from a BibTeX-like XML file: <bibxml:file...
0
by: Stephen | last post by:
I have the following xslt and I am trying to use two levels of grouping. I am first grouping on the report category, then on the report type. The problem is I am sure I have to apply some sort of...
3
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the reports for "Category2<>'CONTRACTS'". I have...
0
by: Darren Clark | last post by:
Is it possible to nest a drop down list in a repeater? (also the repeater has a nested repeater) The code i am using looks like.... i get an error saying that Exception Details:...
1
by: doubledangerbat | last post by:
I'm at a total loss here, I need to create an XSL template for an XML file I have, and can't seem to figure out how to get it finished. I would appreciate any help someone can provide. I have an...
5
by: David | last post by:
Hi, I have an asp page which prints data as follows: The sum in brackets is a calculated result on the page, SQ * RS2("SelectorQty"), a variable SQ which holds a qty multiplied by a record...
4
by: Chris | last post by:
I tried to retrieve the digit grouping symbol in MSAccess but unfortunately 3;0 is retrieved instead of comma which is my symbol. Function retrieves decimal symbol and list separator without any...
12
kcdoell
by: kcdoell | last post by:
Hello: I just learned how to put crosstabs queries together but this one in particular is adding a new dimension in which I was hoping someone could give me some direction. I have the following...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.