468,107 Members | 1,401 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,107 developers. It's quick & easy.

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 2304
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by arun | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.