....or (thinking more in terms of performance) just call your table adapter
query twice - once for LA and once for NY - assigning the results to a
different dataset (i.e. create two datasets in your client application). Then
assign each dataset to a different grid.
You can essentially have as many datasets as you want in your app:
ex:
Dim ds as new system.data.dataset
Dim ds2 as new system.data.dataset
Dim ds3 as new system.data.dataset
....and just fill each one of them up with different calls to your table
adapter.
--
Franklin M. Gauer III
Applications Development Manager
Integrated Companies, Inc.
"Franklin M. Gauer III" wrote:
>
Hi Tom,
Pull all of your data into a dataset and then just create two dataviews from
your dataset. Then assign each dataview to a separate grid.
ex:
....code to load dataset
Dim dv1 As DataView = New DataView(ds.Table ("MyTableName"), "city=NY", "",
DataViewRowState.CurrentRows)
Dim dv2 As DataView = New DataView(ds.Table ("MyTableName"), "city=LA", "",
DataViewRowState.CurrentRows)
--
Franklin M. Gauer III
Applications Development Manager
Integrated Companies, Inc.
"TomH" wrote:
I am using VB within VS 2005. How can I have multiple datagridviews on the
same form pulling from the same table? e.g. I want to see all clients from
New York in one view and all clients from LA in another view on the same
form. I've set up a parameterized tableadapter and pass it the city. How can
I load the two views in VB code when the form loads?
Thanks,
Tom