473,468 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Trying to get subset of data in a grid

I am using VB.net Ent Arch 2003.

I have a dataset that was made through the wizard to create a Windows Data
Form

I have a DataGrid to show/edit the table from my DataSet.

I want to:

Be able to choose the subset of data from the table and then have that
presented in the grid while still using the same update and cancel routines
that the wizard provided.

I used to program in VB 3.0-6.0 and I am just having a little trouble
getting my head around how the XML datasets work... Any links and / or
examples of how to solve the above issue would be greatly appreciated.


Nov 20 '05 #1
4 1053
Hi Atley,

You only have to set a dataview between it, something as
\\\
dim dv as new dataview(mydataset.table)
dv.sort = "MyItem"
dv.rowfilter = "MyItem = 1"
datagrid1.datasource = dv
///
And all is done, keep in mind that the dataview is only a view on the
table, the rest stays all the same.

I hope this helps?

Cor
Nov 20 '05 #2
How do I set the Databinding of the Grid?

grdapp_Budgeted_Hours.SetDataBinding(objdsHistoric alInput,
"app_Budgeted_Hours")

How does this line change?

Thanks for the help!

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi Atley,

You only have to set a dataview between it, something as
\\\
dim dv as new dataview(mydataset.table)
dv.sort = "MyItem"
dv.rowfilter = "MyItem = 1"
datagrid1.datasource = dv
///
And all is done, keep in mind that the dataview is only a view on the
table, the rest stays all the same.

I hope this helps?

Cor

Nov 20 '05 #3
Hi Atley,

I do not know if there is more behind, however the normal databinding from a
datagrid is with that datasource as I did show you, just try.

grdapp_Bugeted_Hours.Datasourse = objdsHistoricalInput.app_Budgeted_Hours
or
grdapp_Bugeted_Hours.Datasourse =
objdsHistoricalInput.tables("app_Budgeted_Hours")

The last part I assume.

And than remove that databinding.

I hope this helps?

Cor
How do I set the Databinding of the Grid?

grdapp_Budgeted_Hours.SetDataBinding(objdsHistoric alInput,
"app_Budgeted_Hours")

How does this line change?

Thanks for the help!

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi Atley,

You only have to set a dataview between it, something as
\\\
dim dv as new dataview(mydataset.table)
dv.sort = "MyItem"
dv.rowfilter = "MyItem = 1"
datagrid1.datasource = dv
///
And all is done, keep in mind that the dataview is only a view on the
table, the rest stays all the same.

I hope this helps?

Cor


Nov 20 '05 #4
Thanks Cor... this helps a lot!
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:O5**************@TK2MSFTNGP12.phx.gbl...
Hi Atley,

I do not know if there is more behind, however the normal databinding from a datagrid is with that datasource as I did show you, just try.

grdapp_Bugeted_Hours.Datasourse = objdsHistoricalInput.app_Budgeted_Hours
or
grdapp_Bugeted_Hours.Datasourse =
objdsHistoricalInput.tables("app_Budgeted_Hours")

The last part I assume.

And than remove that databinding.

I hope this helps?

Cor
How do I set the Databinding of the Grid?

grdapp_Budgeted_Hours.SetDataBinding(objdsHistoric alInput,
"app_Budgeted_Hours")

How does this line change?

Thanks for the help!

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi Atley,

You only have to set a dataview between it, something as
\\\
dim dv as new dataview(mydataset.table)
dv.sort = "MyItem"
dv.rowfilter = "MyItem = 1"
datagrid1.datasource = dv
///
And all is done, keep in mind that the dataview is only a view on the
table, the rest stays all the same.

I hope this helps?

Cor



Nov 20 '05 #5

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

Similar topics

29
by: Chris Dutrow | last post by:
I searched around on the net for a bit, couldn't find anything though. I would like to find some code for a function where I input A Range Of Integers For example: Function( 1, 100 ); And the...
2
by: Jordan O'Hare | last post by:
Hello Everyone, I am after some help with the following: I have a windows application that contains a list box and two data grids. All three controls are binded to a dataset that contains...
2
by: Dave | last post by:
Hello all, I have a class that contains a large number of discrete pieces of state information. Any combination of these member variables might be valid for a given object. Any given member...
1
by: Robert Neville | last post by:
The solution to my dilemma seems straight-forward, yet my mind has not been forthcoming with a direct route. My Project form has a tab control with multiple sub-forms; these distinct sub-forms...
1
by: Henry | last post by:
I hope someone can help me on this. I have two controls on a form. the first is a comboBox the second is a datagrid. Both controls are bound to tables in a common dataset. What I am trying to...
5
by: Kat | last post by:
Hi, I'm trying to set up an asp.net page using flow layout so I'm putting all my controls into a table grid, etc. I use several radiobuttonlists and datagrids that are generated from datasource....
3
by: moondaddy | last post by:
I'm wanting to create a bindable list object made up of a list of business classes. I'm writing this in a vb.net 1.1 winforms app and am using a code example by Rocky Lhotka for reference...
3
by: Eric_Dexter | last post by:
I am having trouble trying to reuse the code that was provided in the wxdemo package of wxpython. The program I am trying to use parts of is Grid_MegaExample.py thier code is class...
5
by: Ronald S. Cook | last post by:
From my business tier (class) I get back an IQueryable<Penof data. Here is my client code that works fine: PenClass penClass = new PenClass(); IQueryable<Penpens = penClass.SelectPens(); ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.