Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Putting the cart before the horse
Message
From
30/10/2003 23:26:55
 
 
To
30/10/2003 22:47:52
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00844526
Message ID:
00844819
Views:
19
Brian,

The ds.AddDataView(dv, "dvShippersByPhone") is a MM method on the mmDataSet ... you won't find any answers in any .NET books. What you could do in the interim (until an MM'er gives you the answer how to do it), is to create the view as a field on your form and then you'll be able to access it anywhere.
- in your form declarations
Dim dvShippersByPhone as DataView

- then when you need to use it
Me.dvShippersByPhone = New DataView(ds.Tables("Shippers"))
Me.dvShippersByPhone.Sort = "Phone"

--etc. etc. .... please excuse me if my VB syntax is a bit off
~~Bonnie


>Morgan,
>
>Yes I now how to do that, what I'm trying to do is retrive the dataview that was created by the BO ie.
> ' Get the current DataSet
> Dim ds As mmDataSet = CType(Me.GetCurrentDataSet(), mmDataSet)
>
> ' Create a custom DataView sorted by phone
> Dim dv As New DataView(ds.Tables("Shippers"))
> dv.Sort = "Phone"
> ds.AddDataView(dv, "dvShippersByPhone")
>I did do some basic research but have not been able to find the answer in MS site or the .Net DataBase books I have.
>I'm trying to retrive dvShippersByPhone in the form to bind it to a cboBox
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform