473,405 Members | 2,294 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,405 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 2513
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
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
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,...
0
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...
0
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...
0
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...
0
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,...

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.