473,624 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple Datasources - DataGrid

Can I bind 3 controls to 3 different datatables?

I have a datagrid with a databound column and 2
DropDownList.

I set the datasource for the datagrid to Table1 and the
DataBoundColumn to Field1 in Table1.

I attempt to set the DataSouce Property for DropDownList
to Table2 and set the DataTextField to "Descriptio n" and
the "DataValueField " to Category. Likewise For the
second DropDownList I set the datasource to Table3 and
DataField and DataValueField to appropriate column names
within Table3.

When I run, I get an error indicating that I must set the
datasource for DropdownList1 at runtime. When I set the
property at runtime I get another error - object is null.

How to I properly set the properties on the DropDownList?

Thanks in advance for your assistance!!!!! !
Nov 17 '05 #1
1 1284
Hi,

On page_load, did you use all dataadapters fill method to fill your
dataset and Bind() your Datagrid?

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
324
by: SammyBar | last post by:
Hi all, I have some custom collections (ArrayList of custom Objects) and I want to display them using typical Windows form controls (DataGrid, Combo). What should I do to expose them as valid datasources to these controls? What if I want that these collections work with Visual Studio on design time in order to allow me easy create grid columns on design time? Can you point me to some examples? Thanks in advance
3
16815
by: lee_mcknight | last post by:
I am using Crystal Enterprise V9. I have a report that needs to have multiple datasets as the datasource(s) on a single subreport (some common lookup data I need to join to is stored in a seperate dataset). The report is working fine with a single dataset as a datasource, but I cannot seem to find any examples of multiple datasets as a datasource. Is this possible? ReportDocument.SetDatasource() seems to only take a single dataset,...
0
2801
by: swethasivaram | last post by:
Hi all I am displaying some information from my database using DetailsView which is bound to SqlDataSource1. <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="SqlDataSource1" ForeColor="#333333" > <asp:SqlDataSource ID="SqlDataSource1" runat="server"
1
1026
by: Jim Heavey | last post by:
Hello , I created 3 data tables which have information necessary for building a datagrid. The datagrid has a databound column which is to come from tableA. There are two dropdown boxes which the first is associated with TableB and the other dropdown box is associated with TableC. I set the Datasource property of the DropDownBox1 to TableB as well as the "DataTextField" and the "DataValueField".
3
1898
by: Jerry | last post by:
Hi, I have a couple of datagrids that are based on dataviews. If I filter dataview1 I would like to automatically filter dataview2. I posted something about this before but I think I didn't specifically focus about that I was using dataviews and just datagrids. Ken Tucker was nice enough to share an example using datagrids and relations/constraints from code (thanks ken). I was able to duplicate this example using components and...
19
3150
by: cpnet | last post by:
I'm using VS2005, C#, ASP.NET 2.0. I'm trying to create a report using SQL Reporting Services (to be used in local mode so I don't have to deal with SQL Server). When I create a new report in my website, nothing shows up in the Website Data Sources window. I added a few different strongly-typed Datasets to my website, and they don't show up. The only way I could get anything to show up was to create a new class that's derived from a...
4
2002
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi guys Just a general query regarding using the AccessDataSource within a website which uses a MasterPage. The layout of my content page is as follows... <asp:Content ID="Content1" ContentPlaceHolderID="cphContent" Runat="Server"> <h1><asp:Label runat="server" Text='<%# Eval("StoryTitle") %>" ID="lblHeading" />
0
3648
by: c0dergirl | last post by:
This c# program allows you to select multiple items from a listbox. For each selected item, a worksheet is created in the workbook with some information. Right now I create a chart that plots some information from one of the sheets. What I want to do is have a line on the graph for every sheet. I assume I use multiple datasources to do this, but I don't know how to use the SeriesCollection class to accomplish this. Here's my code....
7
15646
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is there an equivalent property for the DataGridView? I have searched, but have not found one. I would like the user to be able to see all the columns of the table on one screen - thus eliminating the need to use the horizontal scroll bar to view...
0
8236
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8173
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8679
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8475
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2606
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.