Display Multiple Datasets in a Single GridView or Use a Timer Control to Display Multple Results

I am trying to get the gridview to display the results of multiple dataset that containg SQL Queries. I have a combobox that allows the user to select a Query to run and then it returns the results to the datagrid, however I can not get it to display multiple results in the same gridview.

The following works now to display one along with else if but I need to display all selected at the sametime. I have been advise that this may not be possible, and if it's not can someone direct me on using a Timer Control to display multiple DataSet results in various intervals on the same DataGrid.



Example: if (this.QueryListBox.SelectedItem.ToString() == "Music Files") { MusicFilesSet.MusicFilesDataTable MusicFilesTable = new MusicFilesSet.MusicFilesDataTable (); MusicFilesTableAdapters.MusicFilesDataTableAdapter MusicFilesAdapt = new MUSIC.MusicFilesSetTableAdapters.MusicFilesDataTableAdapter(); MusicFilesAdapt.Connection = _conn; MusicFilesAdapt.Fill(MusicFilesTable, DateTime.Parse(dateTimePicker.Text)); MainGridView.DataSource = MusicFilesTable; }

11/28/2007 9:40:33 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

4 Replies

Similar Articles

[PageSpeed] 20

 No can do with the built-in Grid chief.


My suggestion is to build a grid-looking object with a table and then bind the textboxes/labels to your individual datasets.


You can generate tr tags (and thus render new rows dynamically) by doing a .count on the returned rows in your dataset. 

If this post helped you, Mark As Answer.
11/29/2007 12:04:29 AM

Thanks. I can see that as an option to display all at once, but do you have any suggestions for the timer control?

11/29/2007 4:54:12 PM

there isn't a "timer" per se built into .NET for ASP.  However, you can set a cookie, or you can mark a DateTime and then use javascript (or AJAX) to refresh the page with a new dataset.  This is pretty advanced stuff that is related to AJAX and/or javascript, I'd shoot over to those forums and give it a shot. 

If this post helped you, Mark As Answer.
11/29/2007 5:15:05 PM

Perfect thanks..

11/29/2007 5:26:10 PM

Similar Artilces:

Single Calendar Control, Multiple displaying controls
Hello there,      Technologies used : C# 2005, ASP.Net 2005      Okay, this is the scenario, I am having some 5 textboxes, and 5 image buttons of calendar image, I dont want to create a calendar control for each time I press a different image button. I want to make use of the same calendar control to be used by all the available 5 image buttons. Like, if image 4 is clicked the same calendar opens up and after selecting date, it displays it in the corresponding TextBox4 control, like this, this must be achieved by all the available controls. How can I...

using single instance of embedded browser control for multiple displays
I am currently using two - three embedded browsers in my application. Is it possible to instantiate one instance of the browser control and use that to render the different displays? ...

AutoComplete control display problem when used in a user control; and this usercontrol is appearing multiple time on form
Hi, I am using AutoComplete AjaxControlToolKit extender 1.0.20229.15278 on .NET 2.0 framework. I have a address user control which is used multiple places in single ASPX page. The  Problem I see is the first control shows the Autocomplte popup but another control does not show Autocomplete popup.  I have couple of guess - The BehaviorID is identical on control causing the trouble  - extender control not registered properly for second instance  Here is "the" code I am using for autocomplte extender  <ajaxTool...

Trying to use the FAQ " Sorting and paging in the GridView control when not using data source controls "Sorting and paging in the GridView control when not using..."
and I am not getting the results I had hoped for.  I keep getting a "Compiler Error Message: CS0123: No overload for 'AdhocJobGridView_PageIndexChanged' matches delegate 'System.EventHandler'".   Here is my event handling... protected void AdhocJobGridView_PageIndexChanged(object sender, GridViewPageEventArgs e){ try { AdhocJobGridView.DataSource = wsBaseInfoArray; AdhocJobGridView.PageIndex = e.NewPageIndex; AdhocJobGridView.DataBind(); }catch (Exception ex) {throw ex; }   Here is my aspx... <asp:GridView ID="AdhocJobGridView...

Serialize DataSets on .NET using JQuery's AJAX framework and display to Controls
 Anyone out there using JQuery? If so, I was able to return through Web Methods string values to the client using JQuery's AJAX framework but does anyone know where I can get examples of displaying a .NET DataSet and passing it to the client using JQuery? I know I have to Serialize my DataSet Object to JSON but cannot find a working sample so I can return my dataset and pass it back to multiple TextBox controls on my client using JQuery. Victor A. Palma One relatively easy way is to query it into a List<T> or IEnumerable.  Then, you can rely on .NET to JSON serialize it...

Menu control is displaying behind Gridview control
I have placed a menu control just above the gridview control but when i click the menu control it displaysome of the menu options and rest of the menu options display behind the gridview.Is there anyway any option which make the menu to display over gridview.Mark as answer if anybody's post has helped you Typically the ZIndex will control that: http://www.w3schools.com/Css/pr_pos_z-index.aspDavid Kiffhttp://DavidKiff.co.uk-- "Mark As Answer" If my reply helped you --...

I have a web user control being used by another web user control, but the one being used will not display the labels in the resx file.
I am using DotNetNuke version 3.13 (might be 3.013) on a Window's XP machine, SP2. I have what I find to be an extremely odd situation. I have a project called TDS.Controls. This project is a web control library. Each control has its own resx file, which is located in the App_LocalResources directory. Each control inherits from Framework.UserControlBase, just like DotNetNuke's User control in DNN\Controls\User.ascx.vb. As a matter of fact, this control is doing the exact same thing I am trying to do. It is a web user control with its own resx file being used by another web user control (See ...

How do I display multiple datagrids using the repeater control???
I have a web page at the moment with just one datagrid, which displays employee information about a company. Now my client tells me that there could be more than one company, and so I have created a company table in the underlying database to reflect this (one record per company), and a corresponding Employee table linked to the company table. The problem now is that I need to go through the company table and display the associated Employee information for each company that exists. So the web page now needs to display x number of datagrids depending on how many companies there are. ...

Single date in Gridview and displaying with Calendar Control
Hello all, I'm getting some scope creep with this project right now and I have 2 separate gridviews. They work and present the data as required where one would be visible while the other isn't. However, since it's reading from the database all the way back from the beginning of the year, it takes a while to load up the information. I am trying to just display the current date only once the person views the page. There will then be a calendar control for each gridview that will show that particular date when a date is clicked. Here's the code I have so far. Thanks in advance!...

-- Need to Display data in two GridView controls, but second one could not be displayed?
Dear all, I wrote a code segment to display data in two GridView controls one by one as below. The first one is displayed ok. But, the second one is not displayed. Did I miss anything?         ads.DataFile = "~/App_Data/color_match_live.mdb"                ads.SelectCommand = "SELECT COUNT(*) FROM [tech_mstr] WHERE [month] = ?"        ads.SelectParameters.Add("month", sel_month)        Di...

using controlS to control a gridview
This question is probably posted but i did not bother to look at 10,000+ posts so i am sorry. I've seen the tutorial where he builds a dataset and uses a gridview and controls the gridview with the drop down list box. What i am trying to do is to control the gridview with 2 drop down list boxes. First select the Country you life in and then the State. I've looked at the grid view properties but couldn't find where i can add another parameter. Is it possible to control a grid view (or any form of displaying the information) with more than 1 controller? Thank You.  ...

Validation controls displayed over other controls
Does anyone know of away to display a validation control on top of a dropdownlist? Or any other ideas on how to display an error message on top of a dropdownlist. I'm a novice at this so please don't get too deep in programming. Hi, first of all, most people are used to see validation controls, being it either in a web application or a winforms application, right of the control that needs attention. Being said that you could use the z-index of CSS to display a <span> or <div> tag above your control and put the validation control inside that html tag that you display above y...

Script's control.style.display not reflected in c# control.Style["display"]
I have an ASP.net dropdownlist with a onchange event assigned in Page_Load.  The event handler shows or hides another dropdownlist depending on the value selected, by changing the ctl.style.display between "none" and "inline".  I've also got an asp.net LinkButton on the page which checks the control.Style["display"] value in the codebehind.  It's always what the asp.net first sets it, and never "sees" what the javascript has changed it to - am I doing something wrong?? The page is basically:   <asp:DropDownList I...

Using the gridview to display multiple joined tables, and then allow editing of all columns displayed?
I'm just curious if this is possible. I'm using a SqlDataSource to populate a gridview with data from multiple tables using a inner join select statement.It would be nice if it were possible to allow a user to click "Edit" and be able to update every single column for the particular row in every single table. Is it possible to do something like this?   Yes this is possible, you just have to use the proper Edit SQL command, that might be a little complex depending on how many DataTables you are editing.www.someguy.ca rantings from some Canadian guyFollow me on twitter as...

Web resources about - Display Multiple Datasets in a Single GridView or Use a Timer Control to Display Multple Results - asp.net.presentation-controls

Code division multiple access - Wikipedia, the free encyclopedia
Code division multiple access ( CDMA ) is a channel access method used by various radio communication technologies. It should not be confused ...

Multiple sources raise serious questions about Hillary Clinton's physical health
Breitbart News reports that John Cardillo, a former NYPD officer who provided VIP security details, knows two sources (a federal agent and an ...

iOS 9.3 & watchOS 2.2 betas add ability to pair multiple Apple Watches with an iPhone
... sign that new Apple Watch hardware could be around the corner, Apple's newly released iOS 9.3 beta gives developers the ability to pair multiple ...

Multiple Jobholders Artificially Boost "Full-Time" Employment: Does the Sum of the Parts Equal the Whole ...
... pretty much confirms what I have said about Obamacare boosting part-time employment at the expense of full time jobs. Please consider Multiple ...

Munich Police: Islamic State Planned New Year’s Eve Attack with Multiple Suicide Bombers
Munich police warned of a “serious, imminent threat” by Islamic State group suicide bombers wanting to commit an attack on New Year’s Eve.

An insanely high percentage of people — about 42% — are seeing "Star Wars: The Force Awakens" multiple ...
With the enormous box office sales "Star Wars: The Force Awakens" is generating, it's a good bet that many people are going back numerous times ...

The watchOS 2.2 beta lets devs pair multiple devices to one iPhone
... hands on the first beta for watchOS 2.2 today, and it reportedly contains a feature that has us a little confused: the ability to pair multiple ...

Watch Hero Philly Cop Get Shot Multiple Times And Then Give Chase
Watch Hero Philly Cop Get Shot Multiple Times And Then Give Chase

Killer Instinct's Season 3 will be playable at multiple events
If you're itching to try out Killer Instinct 's Season 3 before its release in March, you may get a chance pretty soon. According to the game's ...

Best Healthcare Benefit Practices for a Growing Company With Multiple Locations
An important part of culture and values for many emerging businesses has been the benefit package they provide for the team. For many businesses, ...

Resources last updated: 1/12/2016 11:03:12 PM