Public Class Form1
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub
    Friend WithEvents C1TrueDBGrid1 As C1.Win.C1TrueDBGrid.C1TrueDBGrid
    Friend WithEvents C1TrueDBGrid2 As C1.Win.C1TrueDBGrid.C1TrueDBGrid
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Friend WithEvents C1DataSet1 As C1.Data.C1DataSet

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))
        Me.C1TrueDBGrid1 = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
        Me.C1DataSet1 = New C1.Data.C1DataSet()
        Me.C1TrueDBGrid2 = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
        Me.Button1 = New System.Windows.Forms.Button()
        CType(Me.C1TrueDBGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.C1DataSet1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.C1TrueDBGrid2, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'C1TrueDBGrid1
        '
        Me.C1TrueDBGrid1.AllowFilter = True
        Me.C1TrueDBGrid1.AllowRowSizing = C1.Win.C1TrueDBGrid.RowSizingEnum.AllRows
        Me.C1TrueDBGrid1.AllowSort = True
        Me.C1TrueDBGrid1.CaptionHeight = 17
        Me.C1TrueDBGrid1.CollapseColor = System.Drawing.Color.Black
        Me.C1TrueDBGrid1.DataChanged = False
        Me.C1TrueDBGrid1.DataMember = "CustOrdersDetails"
        Me.C1TrueDBGrid1.DataSource = Me.C1DataSet1
        Me.C1TrueDBGrid1.BackColor = System.Drawing.Color.Empty
        Me.C1TrueDBGrid1.ExpandColor = System.Drawing.Color.Black
        Me.C1TrueDBGrid1.Images.Add(CType(resources.GetObject("resource.Images"), System.Drawing.Bitmap))
        Me.C1TrueDBGrid1.Location = New System.Drawing.Point(8, 8)
        Me.C1TrueDBGrid1.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder
        Me.C1TrueDBGrid1.Name = "C1TrueDBGrid1"
        Me.C1TrueDBGrid1.PreviewInfo.Location = New System.Drawing.Point(0, 0)
        Me.C1TrueDBGrid1.PreviewInfo.Size = New System.Drawing.Size(0, 0)
        Me.C1TrueDBGrid1.PreviewInfo.ZoomFactor = 75
        Me.C1TrueDBGrid1.RecordSelectorWidth = 16
        Me.C1TrueDBGrid1.RowHeight = 15
        Me.C1TrueDBGrid1.RowSubDividerColor = System.Drawing.Color.DarkGray
        Me.C1TrueDBGrid1.ScrollTips = False
        Me.C1TrueDBGrid1.Size = New System.Drawing.Size(904, 200)
        Me.C1TrueDBGrid1.TabIndex = 0
        Me.C1TrueDBGrid1.Text = "C1TrueDBGrid1"
        Me.C1TrueDBGrid1.PropBag = CType(resources.GetObject("C1TrueDBGrid1.PropBag"), String)
        '
        'C1DataSet1
        '
        Me.C1DataSet1.BindingContextCtrl = Nothing
        Me.C1DataSet1.DataLibrary = "Northwind"
        Me.C1DataSet1.DataLibraryUrl = "tcp://localhost:8000/ThreeTierServer.soap"
        Me.C1DataSet1.DataSetDef = "ProductsOrders"
        Me.C1DataSet1.Locale = New System.Globalization.CultureInfo("en-US")
        Me.C1DataSet1.SchemaClassName = "Northwind.DataClass"
        Me.C1DataSet1.SchemaDef = Nothing
        Me.C1DataSet1.SuppressNotifications = False
        '
        'C1TrueDBGrid2
        '
        Me.C1TrueDBGrid2.AllowFilter = True
        Me.C1TrueDBGrid2.AllowRowSizing = C1.Win.C1TrueDBGrid.RowSizingEnum.AllRows
        Me.C1TrueDBGrid2.AllowSort = True
        Me.C1TrueDBGrid2.CaptionHeight = 17
        Me.C1TrueDBGrid2.CollapseColor = System.Drawing.Color.Black
        Me.C1TrueDBGrid2.DataChanged = False
        Me.C1TrueDBGrid2.DataMember = "ProductsOrderDetailsCust"
        Me.C1TrueDBGrid2.DataSource = Me.C1DataSet1
        Me.C1TrueDBGrid2.BackColor = System.Drawing.Color.Empty
        Me.C1TrueDBGrid2.ExpandColor = System.Drawing.Color.Black
        Me.C1TrueDBGrid2.Images.Add(CType(resources.GetObject("resource.Images1"), System.Drawing.Bitmap))
        Me.C1TrueDBGrid2.Location = New System.Drawing.Point(8, 216)
        Me.C1TrueDBGrid2.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder
        Me.C1TrueDBGrid2.Name = "C1TrueDBGrid2"
        Me.C1TrueDBGrid2.PreviewInfo.Location = New System.Drawing.Point(0, 0)
        Me.C1TrueDBGrid2.PreviewInfo.Size = New System.Drawing.Size(0, 0)
        Me.C1TrueDBGrid2.PreviewInfo.ZoomFactor = 75
        Me.C1TrueDBGrid2.RecordSelectorWidth = 16
        Me.C1TrueDBGrid2.RowHeight = 15
        Me.C1TrueDBGrid2.RowSubDividerColor = System.Drawing.Color.DarkGray
        Me.C1TrueDBGrid2.ScrollTips = False
        Me.C1TrueDBGrid2.Size = New System.Drawing.Size(904, 192)
        Me.C1TrueDBGrid2.TabIndex = 1
        Me.C1TrueDBGrid2.Text = "C1TrueDBGrid2"
        Me.C1TrueDBGrid2.PropBag = CType(resources.GetObject("C1TrueDBGrid2.PropBag"), String)
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(400, 416)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(112, 32)
        Me.Button1.TabIndex = 2
        Me.Button1.Text = "Commit changes"
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(920, 461)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1, Me.C1TrueDBGrid2, Me.C1TrueDBGrid1})
        Me.Name = "Form1"
        Me.Text = "Form1"
        CType(Me.C1TrueDBGrid1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.C1DataSet1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.C1TrueDBGrid2, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        C1DataSet1.Update()
    End Sub

    Private Sub C1DataSet1_BeforeFill(ByVal sender As Object, ByVal e As C1.Data.FillEventArgs) Handles C1DataSet1.BeforeFill
        Dim dataSetDef As C1.Data.SchemaObjects.DataSetDef
        dataSetDef = e.DataSet.Schema.DataSetDefs("ProductsOrders")
        e.Filter.Add(New C1.Data.FilterCondition(dataSetDef.TableViews("ProductsOrderDetailsCust"), "[CategoryID] = 1"))
        e.Filter.Add(New C1.Data.FilterCondition(dataSetDef.TableViews("CustOrdersDetails"), "[CategoryID] = 1"))
    End Sub
End Class
