Display Multiple Sets Of Data In THe Same Datagrid

Display Multiple Sets Of Data In THe Same Datagrid

am 17.04.2008 09:16:33 von Iain Wilson

Hi Can anyone please advise if this is possible and if so how I would
go about it (a pointer to an example would be greatly appreciated).

Using C# - Web Application

I have a DropDownList with the following entries

Room A
Room B
All Rooms

The datasource is a single table containing a list of all room
bookings. (We have 5 meeting rooms)

If Room A or Room B are selected then the Datagrid below is it updated
to display all the bookings for the selected day for the selected
room. This works perfectly.


eg

From To Booked By
07.00.00 07.29.00 An Other
07.30.00 07.59.00 An Other
08.00.00 08.29.00 An Other
08.30.00 08.59.00
09.00.00 09.29.00
09.30.00 09.59.00

However what we need to do is when the user selects the 'All Rooms'
option then the bookings for all rooms will be displayed on the same
grid eg

Room A Room B
From To Booked By Booked By
07.00.00 07.29.00 An Other
07.30.00 07.59.00 An Other Somebody
08.00.00 08.29.00 An Other Somebody
08.30.00 08.59.00
09.00.00 09.29.00 Somebody
09.30.00 09.59.00

How do I populate the datagrid as above.

Any assistance would be appreciated

Best Regards

Iain

Re: Display Multiple Sets Of Data In THe Same Datagrid

am 17.04.2008 10:39:50 von Eliyahu Goldin

I would suggest having one dataset with all bookings for all rooms.
Depending on the ddl selection, you can filter only necessary rows and hide
the columns you don't want to show.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Iain Wilson" wrote in message
news:69c91143-f303-4ea6-885b-18f11d3cb2f0@d45g2000hsc.google groups.com...
> Hi Can anyone please advise if this is possible and if so how I would
> go about it (a pointer to an example would be greatly appreciated).
>
> Using C# - Web Application
>
> I have a DropDownList with the following entries
>
> Room A
> Room B
> All Rooms
>
> The datasource is a single table containing a list of all room
> bookings. (We have 5 meeting rooms)
>
> If Room A or Room B are selected then the Datagrid below is it updated
> to display all the bookings for the selected day for the selected
> room. This works perfectly.
>
>
> eg
>
> From To Booked By
> 07.00.00 07.29.00 An Other
> 07.30.00 07.59.00 An Other
> 08.00.00 08.29.00 An Other
> 08.30.00 08.59.00
> 09.00.00 09.29.00
> 09.30.00 09.59.00
>
> However what we need to do is when the user selects the 'All Rooms'
> option then the bookings for all rooms will be displayed on the same
> grid eg
>
> Room A Room B
> From To Booked By Booked By
> 07.00.00 07.29.00 An Other
> 07.30.00 07.59.00 An Other Somebody
> 08.00.00 08.29.00 An Other Somebody
> 08.30.00 08.59.00
> 09.00.00 09.29.00 Somebody
> 09.30.00 09.59.00
>
> How do I populate the datagrid as above.
>
> Any assistance would be appreciated
>
> Best Regards
>
> Iain
>
>
>