Don't know, how to handle two DataLinks

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Don't know, how to handle two DataLinks

Post by Zero-G. » Tue 06 Jan 2009 11:37

Hey
I use VB.NET 2008 abd your latest controls of dotConnect v 5.0.16.0

So, I have the following situation in my program:
I have a Dataset with a table called order.
I created a UserControl and added two Grid's (from Janus - not MS).
One Grid is a Overview. - The second Grid should handle the details of the order.
So, I added a Datalink and set this DataSource to the DataSet itself.
Then I added a second DataLink, which DataSource is the first DataLink.
Now I coded the following in the Click Event of the overview's Grid:

Code: Select all

If dLinkAuftragDetail.DataSource Is Nothing Then
            Me.dLinkAuftragDetail.DataSource = Me.dLinkOrder
        End If
        Me.dLinkAuftragDetail.Filter = "ID=" & Me.grdÜbersicht.GetValue("id")
        Me.grdAuftrag.AutoSizeColumns()
So, the details are displayed correct, but the overview is also reduced the selected entry. - All other orders are not displayed anymore.
How can I change this behaivor? - So that the overview still holds all orders?
Hope you understand my problem

THX

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 08 Jan 2009 09:51

Please try setting the SeparateEditing property of your dLinkAuftragDetail object to true. You can do this either in design time or in run-time.

Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Post by Zero-G. » Thu 08 Jan 2009 11:05

Hey

Thanks, works fine!
I have set the overview's Seperate Editing to true, not the Child one...

Is there any informaiton about the seperate Editing?

THX

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 08 Jan 2009 12:43

The SeparateEditing property indicates the source of data that this control will use to get its items.
By default, DataLink uses the same DataView that is used by data source that is referenced by DataLink. This affects sorting, filtering of data in the DataLink object.
If you set the SeparateEditing property to true, DataLink creates its own DataView object that is handled by filtering.

For more information, please refer to the Creating and Using DataViews section of MSDN.

Post Reply