Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Display Multiple Sets Of Data In THe Same Datagrid
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




Report this thread to moderator Post Follow-up to this message
Old Post
Iain Wilson
04-17-08 10:40 AM


RE: Display Multiple Sets Of Data In THe Same Datagrid
Hi
I think if you would have provided the code would be more useful. But not at
all a Problem, Here is my analysis and resolution.
1. I hope you are getting the Data from the DB into one table. So, in your
two scenarios, you have two different Column are available.
So, the algorithem I am giving it out here

1. Get the Data from the Database into a DataSet or put it in a Session
(Preferable) as the round trips will be reduced to the DB.
2. On Selection of the Values in the Drop Down, Use the Data Table Select
Property and store the Filtered data into the New DataTable
3. Assign the value to the DataGrid.
4. Remember for every selection you have to submit the page. Which means a
Page Refresh happens.

So, I think probably this should be helpful to you.


--
Srinivas Nadella
Senior Analyst - Dell Services Inc
Hyderabad
India


"Iain Wilson" wrote:

> 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
>
>
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Srinivasa Nadella
04-17-08 10:40 AM


Re: Display Multiple Sets Of Data In THe Same Datagrid
Hi Srinivasa & Eliyahu

Thanks for your replies.

Some useful ideas there.

Many thanks

Iain




Report this thread to moderator Post Follow-up to this message
Old Post
Iain Wilson
04-18-08 10:05 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP .NET archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:32 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.