[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webcontrols

Grouping Data with a Repeater Control

Jason

1/15/2003 3:10:00 AM

I have succesfully implemented the Repeater control but I
am unable to create any kind of group headers. Basically
the dataset consists of information regarding a fault
that a client has logged. Each fault has a category and
the dataset is ordered by this field. What I would like
to do is display the category each time it changes.

Any help that can be provided will be much appreciated.

Regards,

Jason.
1 Answer

Erik Porter [.NET MVP]

1/15/2003 6:12:00 AM

0

There's not really any automatic way to do that, you're going to have to
write some code to do it.

One way might be to keep a public variable of the last category in the
ItemDataBound Event and check to see if it's changed and print it out into a
Literal or Label and if it hasn't, don't print out anything.

The ItemDataBound Event gets fired off once for every row that was
DataBound.

-Erik Porter
Microsoft .NET MVP

"Jason" <jgtaylor@mccaffertys.com.au> wrote in message
news:61dd01c2bc3b$42ab2540$cef82ecf@TK2MSFTNGXA08...
> I have succesfully implemented the Repeater control but I
> am unable to create any kind of group headers. Basically
> the dataset consists of information regarding a fault
> that a client has logged. Each fault has a category and
> the dataset is ordered by this field. What I would like
> to do is display the category each time it changes.
>
> Any help that can be provided will be much appreciated.
>
> Regards,
>
> Jason.