473,320 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 MedicalCondition, and one named Customer. The Customer database
has five foreign keys in it, one to Country, one to MedicalCondition,
and three as self referential keys to Customer (BillTo, for where the
bill goes, EmergencyContact1, and EmergencyContact2).

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 wingFlexClientDataSet. This is the
same DataSet that is being used for the customerBindingSource that
works. wingFlexClientDataSet is a DataSet that includes the complete
Client Schema, which includes Customer, Country, and MedicalCondition.

When I then set up a Data Binding for the DataSource
FK_Customer_Country, which has the Customer.Country Foreign Key linked
to the Country.CountryID Primary Key. The DisplayMember is Country, and
the ValueMember is Country. Under (DataBindings), the SelectedValue is
customerBindingSource. 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_Country).

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 1670
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 wingFlexClientDataSet 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,correct?

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 "DataTextField" 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****@newsgroup.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 MedicalCondition, and one named Customer. The Customer database
has five foreign keys in it, one to Country, one to MedicalCondition,
and three as self referential keys to Customer (BillTo, for where the
bill goes, EmergencyContact1, and EmergencyContact2).

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 wingFlexClientDataSet. This is the
same DataSet that is being used for the customerBindingSource that
works. wingFlexClientDataSet is a DataSet that includes the complete
Client Schema, which includes Customer, Country, and MedicalCondition.

When I then set up a Data Binding for the DataSource
FK_Customer_Country, which has the Customer.Country Foreign Key linked
to the Country.CountryID Primary Key. The DisplayMember is Country, and
the ValueMember is Country. Under (DataBindings), the SelectedValue is
customerBindingSource. 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_Country).

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
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...
0
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...
9
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...
8
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...
0
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...
1
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...
3
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...
0
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...
19
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...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.