Hi,
I do this:
this.comboBox.DataSource =
myDataSet.Tables["receivers"].Select("location_key = " +
selectedLocationKey);
this.comboBox.DisplayMember = "text";
this.comboBox.ValueMember = "subcustomer_location_key";
but get an exception when setting the value member. Unfortunately there
is something wrong with my debugger so I can't see what is in the
exception. I am sure that the columns are named "text" and
"subcustomer_location_key".
I have also tried with the table name: "subreceivers.text" and
"subreceivers.subcustomer_location_key". The same thing happens.
How do I refer to the columns of the data rows in the DataRow array so
that the combobox understands it?
Best regards,
Kim 8 11906
Hi Kim,
Try loading the data into a new DataView class and use the RowFilter
property instead. You can bind to the DataView directly.
--
Dave Sexton
<ki***********@gmail.comwrote in message
news:11**********************@79g2000cws.googlegro ups.com...
Hi,
I do this:
this.comboBox.DataSource =
myDataSet.Tables["receivers"].Select("location_key = " +
selectedLocationKey);
this.comboBox.DisplayMember = "text";
this.comboBox.ValueMember = "subcustomer_location_key";
but get an exception when setting the value member. Unfortunately there
is something wrong with my debugger so I can't see what is in the
exception. I am sure that the columns are named "text" and
"subcustomer_location_key".
I have also tried with the table name: "subreceivers.text" and
"subreceivers.subcustomer_location_key". The same thing happens.
How do I refer to the columns of the data rows in the DataRow array so
that the combobox understands it?
Best regards,
Kim
Hi,
What is wrong with your debugger?
the code seems to be ok but if you do not know what is going on is a little
difficult to know the reason.
Also a little more detail could help, what exception u r getting and where?
--
Ignacio Machin
machin AT laceupsolutions com
<ki***********@gmail.comwrote in message
news:11**********************@79g2000cws.googlegro ups.com...
Hi,
I do this:
this.comboBox.DataSource =
myDataSet.Tables["receivers"].Select("location_key = " +
selectedLocationKey);
this.comboBox.DisplayMember = "text";
this.comboBox.ValueMember = "subcustomer_location_key";
but get an exception when setting the value member. Unfortunately there
is something wrong with my debugger so I can't see what is in the
exception. I am sure that the columns are named "text" and
"subcustomer_location_key".
I have also tried with the table name: "subreceivers.text" and
"subreceivers.subcustomer_location_key". The same thing happens.
How do I refer to the columns of the data rows in the DataRow array so
that the combobox understands it?
Best regards,
Kim
Hi Kim,
I shouldn't have wrote "loading the data" since the DataView doesn't contain
any data at all, it just wraps the specified DataTable. In other words, you
should just create a "view" of the data that you want - using a DataView
won't actually copy the data into a new object.
DataView view = myDataSet.Tables["receivers"].DefaultView;
or
DataView view = new DataView(myDataSet.Tables["receivers"]);
view.RowFilter = "location_key=" + selectedLocationKey;
comboBox.DataSource = view;
comboBox.DisplayMember = "text";
comboBox.ValueMember = "subcustomer_location_key";
Also, you should think about strong-typing your DataSet.
--
Dave Sexton
"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:u1**************@TK2MSFTNGP03.phx.gbl...
Hi Kim,
Try loading the data into a new DataView class and use the RowFilter
property instead. You can bind to the DataView directly.
--
Dave Sexton
<ki***********@gmail.comwrote in message
news:11**********************@79g2000cws.googlegro ups.com...
>Hi, I do this:
this.comboBox.DataSource = myDataSet.Tables["receivers"].Select("location_key = " + selectedLocationKey); this.comboBox.DisplayMember = "text"; this.comboBox.ValueMember = "subcustomer_location_key";
but get an exception when setting the value member. Unfortunately there is something wrong with my debugger so I can't see what is in the exception. I am sure that the columns are named "text" and "subcustomer_location_key". I have also tried with the table name: "subreceivers.text" and "subreceivers.subcustomer_location_key". The same thing happens.
How do I refer to the columns of the data rows in the DataRow array so that the combobox understands it?
Best regards, Kim
Hi Dave!
Thank you for your help - it works. I had forgotten that the DataView
existed :-)
Best regards,
Kim Therkelsen
Hi Kim,
I shouldn't have wrote "loading the data" since the DataView doesn't contain
any data at all, it just wraps the specified DataTable. In other words, you
should just create a "view" of the data that you want - using a DataView
won't actually copy the data into a new object.
DataView view = myDataSet.Tables["receivers"].DefaultView;
or
DataView view = new DataView(myDataSet.Tables["receivers"]);
view.RowFilter = "location_key=" + selectedLocationKey;
comboBox.DataSource = view;
comboBox.DisplayMember = "text";
comboBox.ValueMember = "subcustomer_location_key";
Also, you should think about strong-typing your DataSet.
--
Dave Sexton
"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:u1**************@TK2MSFTNGP03.phx.gbl...
Hi Kim,
Try loading the data into a new DataView class and use the RowFilter
property instead. You can bind to the DataView directly.
--
Dave Sexton
<ki***********@gmail.comwrote in message
news:11**********************@79g2000cws.googlegro ups.com...
Hi,
I do this:
this.comboBox.DataSource =
myDataSet.Tables["receivers"].Select("location_key = " +
selectedLocationKey);
this.comboBox.DisplayMember = "text";
this.comboBox.ValueMember = "subcustomer_location_key";
but get an exception when setting the value member. Unfortunately there
is something wrong with my debugger so I can't see what is in the
exception. I am sure that the columns are named "text" and
"subcustomer_location_key".
I have also tried with the table name: "subreceivers.text" and
"subreceivers.subcustomer_location_key". The same thing happens.
How do I refer to the columns of the data rows in the DataRow array so
that the combobox understands it?
Best regards,
Kim
Hi Ignacio,
I think I have to rephrase the problem with the debugger.
I am developing software for a Windows CE 4.2 PDA. When I run the
software on the PDA from Visual Studio 2005 in debug mode and get an
exception, the contents of the exception can not be shown because some
sort of debugging information is missing.
To make the software made in VS2005 run on the PDA I had to install the
..Net compact framework 2.0 manually. I think somehow the missing debug
information is related to the installation of the .Net framework.
Best regards,
Kim
Hi,
What is wrong with your debugger?
the code seems to be ok but if you do not know what is going on is a little
difficult to know the reason.
Also a little more detail could help, what exception u r getting and where?
--
Ignacio Machin
machin AT laceupsolutions com
<ki***********@gmail.comwrote in message
news:11**********************@79g2000cws.googlegro ups.com...
Hi,
I do this:
this.comboBox.DataSource =
myDataSet.Tables["receivers"].Select("location_key = " +
selectedLocationKey);
this.comboBox.DisplayMember = "text";
this.comboBox.ValueMember = "subcustomer_location_key";
but get an exception when setting the value member. Unfortunately there
is something wrong with my debugger so I can't see what is in the
exception. I am sure that the columns are named "text" and
"subcustomer_location_key".
I have also tried with the table name: "subreceivers.text" and
"subreceivers.subcustomer_location_key". The same thing happens.
How do I refer to the columns of the data rows in the DataRow array so
that the combobox understands it?
Best regards,
Kim
Hi,
<ki***********@gmail.comwrote in message
news:11**********************@n67g2000cwd.googlegr oups.com...
Hi Ignacio,
I think I have to rephrase the problem with the debugger.
I am developing software for a Windows CE 4.2 PDA. When I run the
software on the PDA from Visual Studio 2005 in debug mode and get an
exception, the contents of the exception can not be shown because some
sort of debugging information is missing.
Weird, are you getting something about "resource assembly" ?
To make the software made in VS2005 run on the PDA I had to install the
.Net compact framework 2.0 manually. I think somehow the missing debug
information is related to the installation of the .Net framework.
I had never need to install the framework manually, it's always installed
from the IDE when you run the app.
I think you have something wrong with your dev. environment.
--
Ignacio Machin
machin AT laceupsolutions com
Hi again,
I get the message:
"An error message cannot be displayed because an optional resource
assembly containing it cannot be found"
whenever I get an exception.
It IS necessary to install the .Net framework 2.0 manually: http://blogs.msdn.com/markprenticems...08/692624.aspx
Best regards,
Kim
Ignacio Machin ( .NET/ C# MVP ) skrev:
Hi,
<ki***********@gmail.comwrote in message
news:11**********************@n67g2000cwd.googlegr oups.com...
Hi Ignacio,
I think I have to rephrase the problem with the debugger.
I am developing software for a Windows CE 4.2 PDA. When I run the
software on the PDA from Visual Studio 2005 in debug mode and get an
exception, the contents of the exception can not be shown because some
sort of debugging information is missing.
Weird, are you getting something about "resource assembly" ?
To make the software made in VS2005 run on the PDA I had to install the
.Net compact framework 2.0 manually. I think somehow the missing debug
information is related to the installation of the .Net framework.
I had never need to install the framework manually, it's always installed
from the IDE when you run the app.
I think you have something wrong with your dev. environment.
--
Ignacio Machin
machin AT laceupsolutions com
Hi,
This seems like the old "resource assembly" error in 1.1, maybe is the same
one.
Check the blog of the CF to see if there are answers there.
--
Ignacio Machin
machin AT laceupsolutions com
<ki***********@gmail.comwrote in message
news:11**********************@48g2000cwx.googlegro ups.com...
Hi again,
I get the message:
"An error message cannot be displayed because an optional resource
assembly containing it cannot be found"
whenever I get an exception.
It IS necessary to install the .Net framework 2.0 manually: http://blogs.msdn.com/markprenticems...08/692624.aspx
Best regards,
Kim
Ignacio Machin ( .NET/ C# MVP ) skrev:
>Hi,
<ki***********@gmail.comwrote in message news:11**********************@n67g2000cwd.googleg roups.com...
Hi Ignacio,
I think I have to rephrase the problem with the debugger.
I am developing software for a Windows CE 4.2 PDA. When I run the
software on the PDA from Visual Studio 2005 in debug mode and get an
exception, the contents of the exception can not be shown because some
sort of debugging information is missing.
Weird, are you getting something about "resource assembly" ?
To make the software made in VS2005 run on the PDA I had to install the
.Net compact framework 2.0 manually. I think somehow the missing debug
information is related to the installation of the .Net framework.
I had never need to install the framework manually, it's always installed from the IDE when you run the app.
I think you have something wrong with your dev. environment. -- Ignacio Machin machin AT laceupsolutions com
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kaneda |
last post by:
Hello everyone!
I have some weird(?) problems, and I am not quite sure if there are due to
my errors or maybe a limitation in the .Net framework.
I have a ComboBox I need to fill with the...
|
by: Shravan |
last post by:
Hi,
How can I bind DataRow array to ComboBox.
I tried setting
DataSource -> DataRow Array
DisplayMember -> ColumnName
But it was showing
"System.Data.DataRow"
for every item in the...
|
by: Hugo Lefevre |
last post by:
dear,
I have a form (frmlogonaccounts.cs) with a combobox, which I want to fill up
with the first column of a dataset. The dataset is created in the class
Login. My problem is the next : I make...
|
by: MrNobody |
last post by:
I seem to be having trouble trying to select the right value in a ComboBox
DataSourced by a DataTable with a value for a DataRow...
For example... In a Windows Form, I have a ComboBox:
...
|
by: reidarT |
last post by:
I am filling a combobox with data from a table.
This is done with the code below.
After update of the combobox I want to fill txtField2 with data from Field2
in the select-statement.
How can I do...
|
by: reidarT |
last post by:
I have found a good combobox with multiple fields
The example shows filling the combobox from a listview, but I want to fill
it with zip-code and cities from a database.
The example is as follows:...
|
by: fstenoughsnoopy |
last post by:
I have a customer order database and I need to pull a customers
information, ie first name, last name, address, city, state, zip,
phone, etc, into the oder table. i don't know how to go about...
|
by: sixths3ns3 |
last post by:
My DataGridView has two columns. Combobox Column 2 displays list based on Combobox Column 1 selected value. The code below works fine when I select a value on Column 1, and select a value on Column...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
| |