Trying to get subset of data in a grid by:Atley
|
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.
|
| | Reply: by:Cor Ligthert
|
| | 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
|
| | Reply: by:Atley
|
| | How do I set the Databinding of the Grid?
grdapp_Budgeted_Hours.SetDataBinding(objdsHistoricalInput, "app_Budgeted_Hours")
How does this line change?
Thanks for the help!
|
| | Reply: by:Cor Ligthert
|
| | 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
|
| | Reply: by:Atley
|
| | Thanks Cor... this helps a lot!
|
0 Comments:
Post a Comment