|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataViews with DataSetsthree tables. I would like to use a DataView to format the DataTables but I'm not sure how to go about this. Currently I have; dsVendorContacts is a DataSet with three tables and relational links dgVendors is a DataGrid With dgVendors .DataSource = dsVendorContacts .DataMember = "wwVendors" End With If I create three DataViews, how do I attach the three seperate DataViews to the grid and specify the main DataView? Can I put DataViews into a DataSet? Thanks, Bernie Bernie,
Every datatable has one dataview. The name of that is the defaultview. The dataview is nothing more than a class that holds things as a rowfilter, a sort property and a collection of references to the dataviewrows (which all have again a reference to a datarow). Therefore you cannot handle it as a real table. I hope this helps, Cor Show quoteHide quote "Bernie Hunt" <bh***@optonline.net> schreef in bericht news:Xns97C0A0DBAC551bhuntoptonlinenet@207.46.248.16... >I currently have a datagrid that I'm feeding with a DataSet, which contains > three tables. I would like to use a DataView to format the DataTables but > I'm not sure how to go about this. > > Currently I have; > > dsVendorContacts is a DataSet with three tables and relational links > dgVendors is a DataGrid > > With dgVendors > .DataSource = dsVendorContacts > .DataMember = "wwVendors" > End With > > If I create three DataViews, how do I attach the three seperate DataViews > to the grid and specify the main DataView? > > Can I put DataViews into a DataSet? > > Thanks, > > Bernie Hi Cor!
So then, using my previous example, would I? dsVendorContacts is a DataSet with three tables and relational links dgVendors is a DataGrid With dsVendorContacts.Tables("wwVendors").DefaultView .Sort = "LastName ASC" .AllowNew = False End With With dgVendors .DataSource = dsVendorContacts .DataMember = "wwVendors" End With And the sort and disallow would be in the grid when shown? Sorry I'm away from my development station so I can't try out. It's working on paper this morning. Bernie Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in news:uMw54kTdGHA.3344@TK2MSFTNGP05.phx.gbl: > Bernie, > > Every datatable has one dataview. > The name of that is the defaultview. > > The dataview is nothing more than a class that holds things as a > rowfilter, a sort property and a collection of references to the > dataviewrows (which all have again a reference to a datarow). > > Therefore you cannot handle it as a real table. > > I hope this helps, > > Cor > > "Bernie Hunt" <bh***@optonline.net> schreef in bericht > news:Xns97C0A0DBAC551bhuntoptonlinenet@207.46.248.16... >>I currently have a datagrid that I'm feeding with a DataSet, which >>contains >> three tables. I would like to use a DataView to format the DataTables >> but I'm not sure how to go about this. >> >> Currently I have; >> >> dsVendorContacts is a DataSet with three tables and relational links >> dgVendors is a DataGrid >> >> With dgVendors >> .DataSource = dsVendorContacts >> .DataMember = "wwVendors" >> End With >> >> If I create three DataViews, how do I attach the three seperate >> DataViews to the grid and specify the main DataView? >> >> Can I put DataViews into a DataSet? >> >> Thanks, >> >> Bernie > > > Bernie,
If I don't oversee something, yes. Cor Show quoteHide quote "Bernie Hunt" <bh***@optonline.net> schreef in bericht news:Xns97C144610CE45bhuntoptonlinenet@207.46.248.16... > Hi Cor! > > So then, using my previous example, would I? > > dsVendorContacts is a DataSet with three tables and relational links > dgVendors is a DataGrid > > With dsVendorContacts.Tables("wwVendors").DefaultView > .Sort = "LastName ASC" > .AllowNew = False > End With > > With dgVendors > .DataSource = dsVendorContacts > .DataMember = "wwVendors" > End With > > And the sort and disallow would be in the grid when shown? > > Sorry I'm away from my development station so I can't try out. It's > working on paper this morning. > > Bernie > > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in > news:uMw54kTdGHA.3344@TK2MSFTNGP05.phx.gbl: > >> Bernie, >> >> Every datatable has one dataview. >> The name of that is the defaultview. >> >> The dataview is nothing more than a class that holds things as a >> rowfilter, a sort property and a collection of references to the >> dataviewrows (which all have again a reference to a datarow). >> >> Therefore you cannot handle it as a real table. >> >> I hope this helps, >> >> Cor >> >> "Bernie Hunt" <bh***@optonline.net> schreef in bericht >> news:Xns97C0A0DBAC551bhuntoptonlinenet@207.46.248.16... >>>I currently have a datagrid that I'm feeding with a DataSet, which >>>contains >>> three tables. I would like to use a DataView to format the DataTables >>> but I'm not sure how to go about this. >>> >>> Currently I have; >>> >>> dsVendorContacts is a DataSet with three tables and relational links >>> dgVendors is a DataGrid >>> >>> With dgVendors >>> .DataSource = dsVendorContacts >>> .DataMember = "wwVendors" >>> End With >>> >>> If I create three DataViews, how do I attach the three seperate >>> DataViews to the grid and specify the main DataView? >>> >>> Can I put DataViews into a DataSet? >>> >>> Thanks, >>> >>> Bernie >> >> >> > Bernie,
I once had a problem with that, so I use forever. dgVendors.DataSource = dsVendorContacts.Tables("wwVendors").DefaultView There is than no need to set the member. cor
strange behavior , has someone an explanation for this ??
how to not use VB.net Windows Forms and Console Application [VB2005EE] accessing control-specific functions via form's ActiveControl Developing ASP.NET 2.0 Applications 'Incremental Search' of data base or "Wheres the 'Seek' method Visual C to Visual Basic Converstion Help... Data type conversion question textbox numeric with 2 decimals .Net Mail only goes to one |
|||||||||||||||||||||||