Visual Studio .NET - displaying data? - Asked By John Millja on 09-Mar-04 09:41 AM

I have a resultset as follows:

DayOfTheweek           Project                 Hours worked
monday                     project 1                  3
monday                     project 2                  3
monday                     project 3                  2
Tuesday                    project 1                  8
Wed..                        Project 1                  7
wed..                        project 2                  1
Thursd                      project3                   8
friday                       project 4                  7
friday                       project 1                  1

On User Interface I wanted to display as follows:

DayOfTheweek           Project                 Hours worked
monday                      project 1                  3
                                 project 2                  3
                                 project 3                  2
Tuesday                     project 1                  8
Wed..                         Project 1                  7
                                  project 2                  1
Thursd                        project3                   8
friday                         project 4                  7
                                 project 1                  1

The idea is even though in a week day you have worked in three or more project the week day should repeat only once.

Any idea?

Really depends on how you intent to display - Asked By Peter Bromberg on 09-Mar-04 07:26 PM

the data.

if it's in a DataGrid ServerControl, you could look into ItemTemplateColumn for DayofTheWeek and use DataBinder.Eval combined with some method that checks if the content of the previous column cell is the same.

There are other ways to do it, but first, you gotta decide how you are going to display the data. 

Another angle would be to "head it off at the pass" by handling all this in the SQL that generates your resultset with a case / when statement