473,598 Members | 2,916 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datasources and Display

Hey,

I have an application codenamed WingFlex. It has a number of aspects to
it, but the prudent parts for this problem are all within the "Client"
Schema. The Client schema has three tables in it, on named Country, one
named MedicalConditio n, and one named Customer. The Customer database
has five foreign keys in it, one to Country, one to MedicalConditio n,
and three as self referential keys to Customer (BillTo, for where the
bill goes, EmergencyContac t1, and EmergencyContac t2).

I have created data entry views for Country and Medical Condition
without error, and have even added some hotkeys to make the data entry
easier. I can even enter the Country codes and Medical Condition ID's,
and the various self referentials, and these are all enforced by the SQL
Server.

What I am then trying to do is add some ComboBoxes (Dropdown boxes) that
display the Name field and have a value of the ID field for their
respective foreign key. But when I try to add the ComboBoxes and attach
the data, the are not looking up the data (If I use the Preview Data
option it works perfectly).

I have attempted to add another BindingSource, for Country. The
DataMember is Country, DataSource is wingFlexClientD ataSet. This is the
same DataSet that is being used for the customerBinding Source that
works. wingFlexClientD ataSet is a DataSet that includes the complete
Client Schema, which includes Customer, Country, and MedicalConditio n.

When I then set up a Data Binding for the DataSource
FK_Customer_Cou ntry, which has the Customer.Countr y Foreign Key linked
to the Country.Country ID Primary Key. The DisplayMember is Country, and
the ValueMember is Country. Under (DataBindings), the SelectedValue is
customerBinding Source. One thing that I have noticed is that the
ValueMember and DisplayMember can only be set to the fields within the
Customer BindingSource, even with the Data Binding set to a field in the
Country table (FK_Customer_Co untry).

However, even with the above setup, which so far as I can tell is
correct, the combobox displays as blank. Nothing is displayed, and
nothing is selectable.

I can't think of a way to send a copy without posting the complete
solution (which I have replicated in a 1.12MB test solution) as it
doesn't involve any non IDE generated code. Even if I did post the
solution, the Database would still be missing, and I presume this would
be a problem.

Any idea what is going wrong?

Regards,

Wingot
Dec 7 '07 #1
1 1682
Hi Wingot,

Just inform you that I've updated you in the old thread on this databinding
issue. For your convenience, I've pasted the reply here also:

=============== =========
For the further scenario you mentioned, my understand is that you now let
the wingFlexClientD ataSet return tree tables(with relations) and then bind
each of them to different dropdownlist (via setting DataMember), but found
the dropdownlist doesn't get populated,corre ct?

Would you confirm the following things:

** are you purely use datasource control(no extra code) for the databinding

** for the value you set to the dropdownlist's "DataTextFi eld" and
"DataValueField " are set to the correct column field name(in the certain
table in DataSet), these columns should not be any column in other
table(linked by the original table) since ASP.NET databinding does not
support automatically linked multipe table through relation.

You can also try creating a simple aspx page and put the dropdownlist and
datasource control at top level to see whether it can works. If that also
not work, we can first concentrate on such a simplified page.

BTW, I've seen your another new thread posted. Do you think it proper that
we continue discuss here or in that one?

=============== =============== ==========

You can choose either one for us to continue discuss on this problem.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

=============== =============== =============== =====

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Wingot" <wi****@newsgro up.nospam>
Subject: Datasources and Display
Date: Fri, 7 Dec 2007 09:32:40 +0900

Hey,

I have an application codenamed WingFlex. It has a number of aspects to
it, but the prudent parts for this problem are all within the "Client"
Schema. The Client schema has three tables in it, on named Country, one
named MedicalConditio n, and one named Customer. The Customer database
has five foreign keys in it, one to Country, one to MedicalConditio n,
and three as self referential keys to Customer (BillTo, for where the
bill goes, EmergencyContac t1, and EmergencyContac t2).

I have created data entry views for Country and Medical Condition
without error, and have even added some hotkeys to make the data entry
easier. I can even enter the Country codes and Medical Condition ID's,
and the various self referentials, and these are all enforced by the SQL
Server.

What I am then trying to do is add some ComboBoxes (Dropdown boxes) that
display the Name field and have a value of the ID field for their
respective foreign key. But when I try to add the ComboBoxes and attach
the data, the are not looking up the data (If I use the Preview Data
option it works perfectly).

I have attempted to add another BindingSource, for Country. The
DataMember is Country, DataSource is wingFlexClientD ataSet. This is the
same DataSet that is being used for the customerBinding Source that
works. wingFlexClientD ataSet is a DataSet that includes the complete
Client Schema, which includes Customer, Country, and MedicalConditio n.

When I then set up a Data Binding for the DataSource
FK_Customer_Co untry, which has the Customer.Countr y Foreign Key linked
to the Country.Country ID Primary Key. The DisplayMember is Country, and
the ValueMember is Country. Under (DataBindings), the SelectedValue is
customerBindin gSource. One thing that I have noticed is that the
ValueMember and DisplayMember can only be set to the fields within the
Customer BindingSource, even with the Data Binding set to a field in the
Country table (FK_Customer_Co untry).

However, even with the above setup, which so far as I can tell is
correct, the combobox displays as blank. Nothing is displayed, and
nothing is selectable.

I can't think of a way to send a copy without posting the complete
solution (which I have replicated in a 1.12MB test solution) as it
doesn't involve any non IDE generated code. Even if I did post the
solution, the Database would still be missing, and I presume this would
be a problem.

Any idea what is going wrong?

Regards,

Wingot
Dec 7 '07 #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
0
1561
by: Greg | last post by:
Anyone having issues with their object datasources appearing and vanishing from the datasource browser? I create an object for binding as a datasource in my App_Code folder, compile my web project and it appears in the datasources in the report designer. Then I will make an aspx, setup a reportviewer control for my new report, go back to the rdlc and the object datasource sometimes just vanishes. I refresh, no luck.
9
2895
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got answered... There are articles on the new TableAdapters where it says that a key new advantage is that a single TableAdapter, which can have multiple queries, can be used on multiple forms. Now that was in an article on using TableAdapters with...
8
1824
by: Joey Chömpff | last post by:
L.S., Hello is there a way to implement 2-way databinding without using the datasources from dotnet 2.0. Why would you ask? Now that's simple. I've created an object model with BusinessObjects and I don't want to write an separate provider layer for the datasources. This is because I loose all the benefits of my objectmodel. Are there other developers who think this way?
0
1169
by: Owen Richardson | last post by:
I have a page that displays a news article in a form view feeding off a datasource that just picks up the id from a query string. I want to add functionality for related links - so i created a stored procedure that takes three parameters. On the page i have added a second datasource which calls my stored proc, and spits out the results into a Repeater. Currently however the two datasources are independant - my second data source takes 3...
1
2035
by: Magnus | last post by:
I have a set of typed datasets that are tied to a database on a mssql2005 server. They are naturally displayed and available in the DataSources window. Now I want to rename the database, but when I do that and reconfigure any of the datasets with the Wizard, all the datatables I have previously selected are marked as unavailable (with a red x next to it), and displays all database objects in the renamed database as "new" and unchecked. ...
3
7230
by: jobs | last post by:
I've got a gridview that does not have a datasourceid assigned in the markup. I'd like to switch between two datasources in the codebehind. when I do switch, I first reset the the gridviewx.datasource = nothing and gridviewx.datasourceid = nothing before setting it to gridviewx.datasource = newdatasoruceid and then rebinding. All appears to work well until I try to excute a delete command that
0
1011
by: Nobody | last post by:
Is it possible to have nested datasources? I have a page that I want laid out like this: rptCategories ==Category 1 rptItems ==Item 1 rptCategories ==Category 2 rptItems ==Item 1 rptCategories ==Category 3 rptItems ==Item 1
19
3145
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...
0
7894
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
8284
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
8392
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8262
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...
0
6711
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
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
5437
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
3894
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

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.