Thursday, March 22, 2012

Supress repeating values in gridview

Hello!

Customer wants a gridview displaying individuals who have taken part
in courses. The gridview should be sorted by the name of the
participant. If a person has taken part in several courses, the name
should only be stated once. Example:
Course Participant Date
Skateboarding John Doe May 1st 2007
Sailing Mary Doe June 5th 2007
Skateboarding June 10th 2007
Parasailing Ken Foll June 8th 2007

Since Mary has taken part in two courses (sailing and skateboarding)
her name should be stated only once.
How can I achieve this?

TIA

Regards!Handle the gridview's PreRender event. In the event loop through the Rows
collection, detect rows with the same Participant values and replace
repeating values with empty string.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
<Swede.Swede@.gmail.comwrote in message
news:1189456778.612104.325910@.22g2000hsm.googlegro ups.com...

Quote:

Originally Posted by

Hello!
>
Customer wants a gridview displaying individuals who have taken part
in courses. The gridview should be sorted by the name of the
participant. If a person has taken part in several courses, the name
should only be stated once. Example:
Course Participant Date
Skateboarding John Doe May 1st 2007
Sailing Mary Doe June 5th 2007
Skateboarding June 10th 2007
Parasailing Ken Foll June 8th 2007
>
Since Mary has taken part in two courses (sailing and skateboarding)
her name should be stated only once.
How can I achieve this?
>
TIA
>
Regards!
>

0 comments:

Post a Comment