473,320 Members | 1,841 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.

2 mutually exclusive listboxes - in vb.net with dataviews HELP

Can and how do you alter a data view to include a look up field from another
data table? The data table of the dataview only has the key, the value I need
is in another data table.

Can and how to you reference the value of a column in a data table/view from
the row filter string of a different data view.

I'm using a strongly typed dataset.

Below is more info.
ok...
I'm trying to create 2 mutually exclusive listboxes in vb.net using
dataview(s) of a strongly typed dataset. I dragged two tables onto the XSD
file and created the relationship. DeviceSoftware.SoftwareID =
Software.SoftwareID The 2 data tables are populated by 2 stored procedures.

I have 2 data tables, DeviceSoftware and Software.
DeviceSoftware is a child that holds the DeviceID's and their software
(SoftwareIDs)

Software is the parent but is more like a look up of distinct software
titles.

ListBox1 items should show Software Titles that are installed on a paticular
Device (deviceID). How do I bind ListBox1 to the DeviceSoftware data table or
a data view when actual Software names are held in the Software table. I am
setting the Datasource for the ListBox to the data view, except the dataview
only has the SoftwareID field not the SoftwareName Field.

ListBox2 items should show all the OTHER Software Titles not installed on
the device. I have the same binding problems except, I need the row filter to
exlcude
Software Names that are already installed on the device.

I want to be able to drag and drop items back and forth between Listbox1 and
Listbox2 (that is a whole nother issue).

Nov 22 '05 #1
3 2510
If I understand you correctly, just make sure you create new DataViews. If
you use the new Keyword then you can you reference the same table and they
will behave independently.

DataView bindingView1 = new DataView(TableName);
DataView bindingView2 = new DataView(TableName);//same table for each

Then you can bind the listboxes and change the rowfilters or whatever and
they will behave independently

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"softengine" <so********@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com...
Can and how do you alter a data view to include a look up field from another data table? The data table of the dataview only has the key, the value I need is in another data table.

Can and how to you reference the value of a column in a data table/view from the row filter string of a different data view.

I'm using a strongly typed dataset.

Below is more info.
ok...
I'm trying to create 2 mutually exclusive listboxes in vb.net using
dataview(s) of a strongly typed dataset. I dragged two tables onto the XSD
file and created the relationship. DeviceSoftware.SoftwareID =
Software.SoftwareID The 2 data tables are populated by 2 stored procedures.
I have 2 data tables, DeviceSoftware and Software.
DeviceSoftware is a child that holds the DeviceID's and their software
(SoftwareIDs)

Software is the parent but is more like a look up of distinct software
titles.

ListBox1 items should show Software Titles that are installed on a paticular Device (deviceID). How do I bind ListBox1 to the DeviceSoftware data table or a data view when actual Software names are held in the Software table. I am setting the Datasource for the ListBox to the data view, except the dataview only has the SoftwareID field not the SoftwareName Field.

ListBox2 items should show all the OTHER Software Titles not installed on
the device. I have the same binding problems except, I need the row filter to exlcude
Software Names that are already installed on the device.

I want to be able to drag and drop items back and forth between Listbox1 and Listbox2 (that is a whole nother issue).

Nov 22 '05 #2
all the examples I see only show 1 dataview to 1 table relationship. Are you
saying use 1 view to 2 datatables or 1 view to 2 subviews?

"W.G. Ryan eMVP" wrote:
If I understand you correctly, just make sure you create new DataViews. If
you use the new Keyword then you can you reference the same table and they
will behave independently.

DataView bindingView1 = new DataView(TableName);
DataView bindingView2 = new DataView(TableName);//same table for each

Then you can bind the listboxes and change the rowfilters or whatever and
they will behave independently

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"softengine" <so********@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com...
Can and how do you alter a data view to include a look up field from

another
data table? The data table of the dataview only has the key, the value I

need
is in another data table.

Can and how to you reference the value of a column in a data table/view

from
the row filter string of a different data view.

I'm using a strongly typed dataset.

Below is more info.
ok...
I'm trying to create 2 mutually exclusive listboxes in vb.net using
dataview(s) of a strongly typed dataset. I dragged two tables onto the XSD
file and created the relationship. DeviceSoftware.SoftwareID =
Software.SoftwareID The 2 data tables are populated by 2 stored

procedures.

I have 2 data tables, DeviceSoftware and Software.
DeviceSoftware is a child that holds the DeviceID's and their software
(SoftwareIDs)

Software is the parent but is more like a look up of distinct software
titles.

ListBox1 items should show Software Titles that are installed on a

paticular
Device (deviceID). How do I bind ListBox1 to the DeviceSoftware data table

or
a data view when actual Software names are held in the Software table. I

am
setting the Datasource for the ListBox to the data view, except the

dataview
only has the SoftwareID field not the SoftwareName Field.

ListBox2 items should show all the OTHER Software Titles not installed on
the device. I have the same binding problems except, I need the row filter

to
exlcude
Software Names that are already installed on the device.

I want to be able to drag and drop items back and forth between Listbox1

and
Listbox2 (that is a whole nother issue).


Nov 22 '05 #3
hmm, not re-ask the question

I have the following schema for the two tables

dataset1.datatable1 schema
deviceID
softwareID

dataset2.datatable2 schema
softwareID
softwareName
softwareDesc

Listbox1 is bound to datatable1 but needs to show softwareName, so listbox1
only shows the softwareID, I need it to do a lookup on datatable2 to get the
softwareName

If I bound Listbox1 to datatable2 instead, I still have a problem with how
do I only show softwareName records that are assigned to datatable1

I can use dataviews to filter, but what will the dataview.rowfilter() look
like???

"W.G. Ryan eMVP" wrote:
If I understand you correctly, just make sure you create new DataViews. If
you use the new Keyword then you can you reference the same table and they
will behave independently.

DataView bindingView1 = new DataView(TableName);
DataView bindingView2 = new DataView(TableName);//same table for each

Then you can bind the listboxes and change the rowfilters or whatever and
they will behave independently

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"softengine" <so********@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com...
Can and how do you alter a data view to include a look up field from

another
data table? The data table of the dataview only has the key, the value I

need
is in another data table.

Can and how to you reference the value of a column in a data table/view

from
the row filter string of a different data view.

I'm using a strongly typed dataset.

Below is more info.
ok...
I'm trying to create 2 mutually exclusive listboxes in vb.net using
dataview(s) of a strongly typed dataset. I dragged two tables onto the XSD
file and created the relationship. DeviceSoftware.SoftwareID =
Software.SoftwareID The 2 data tables are populated by 2 stored

procedures.

I have 2 data tables, DeviceSoftware and Software.
DeviceSoftware is a child that holds the DeviceID's and their software
(SoftwareIDs)

Software is the parent but is more like a look up of distinct software
titles.

ListBox1 items should show Software Titles that are installed on a

paticular
Device (deviceID). How do I bind ListBox1 to the DeviceSoftware data table

or
a data view when actual Software names are held in the Software table. I

am
setting the Datasource for the ListBox to the data view, except the

dataview
only has the SoftwareID field not the SoftwareName Field.

ListBox2 items should show all the OTHER Software Titles not installed on
the device. I have the same binding problems except, I need the row filter

to
exlcude
Software Names that are already installed on the device.

I want to be able to drag and drop items back and forth between Listbox1

and
Listbox2 (that is a whole nother issue).


Nov 22 '05 #4

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

Similar topics

5
by: wooks | last post by:
I have defined a schema with an xsd:choice element for 2 mutually exclusive fields. When both are present I get an error which is good, but what is not so good is the error message which says...
3
by: softengine | last post by:
Can and how do you alter a data view to include a look up field from another data table? The data table of the dataview only has the key, the value I need is in another data table. Can and how...
2
by: Stimp | last post by:
I'm getting the error: 'SelectedIndex' and 'SelectedValue' attributes are mutually exclusive when I try to populate a series of dropdowns... any idea what I could be doing wrong here? ...
2
by: arun | last post by:
Hi Can any one suggest me how to access the mutually exclusive check box extender in a table of 7 rows by 14 columns. Only one can be selected in each row. Other than checking each one with if...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: 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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.