Solved

Repeater Group By

Posted on 2009-07-14
3
606 Views
Last Modified: 2012-10-15
I have a repeater that has the following data in it.

Group a, some data.....
Group a, some data.....
Group b, some data.....
Group b, some data.....
Group c, some data.....

I'd like it to print like...

Group a, some data.....
               some data.....
Group b, some data.....
               some data.....
Group c, some data.....

Any suggestions on how to go about this?  I'm coding in VB.
0
Comment
Question by:mmeisel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 20

Expert Comment

by:informaniac
ID: 24849682
In case u r using oracle or sql server 2005...

http://www.experts-exchange.com/Database/Oracle/9.x/Q_22584378.html
0
 
LVL 15

Expert Comment

by:jinal
ID: 24849893
1.
If you bind DataTable to Repeater then better format DataTable such a way that it display look like group.

Original
Group A          10                20
Group A          10                30
Group B          20                10
Group B          20                40
Group B          20                10
After coversion
Group A          10                20
                        10                30
Group B         20                10
                        20                40
                        20                10
Means make first row appear for group and make another column blank.

2.
Following link may help you.
http://www.aspcode.net/ASPNET-grouping-repeater-control.aspx
http://www.codeproject.com/KB/custom-controls/GroupedRepeater.aspx
0
 
LVL 1

Accepted Solution

by:
mmeisel earned 0 total points
ID: 24850050
I handled this on ItemDataBound.
Protected Sub Repeater1_DataBound(ByVal sender As Object, ByVal e As RepeaterItemEventArgs)
        Dim item As RepeaterItem = e.Item
        If item.ItemType = ListItemType.AlternatingItem OrElse item.ItemType = ListItemType.Item Then
            If CType(item.FindControl("Label1"), Label).Text = Session("Variable") Then
                CType(item.FindControl("Label1"), Label).Visible = False
            End If
 
            Session("Variable") = CType(item.FindControl("Label1"), Label).Text
        End If
    End Sub

Open in new window

0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question