Imports System.IO
Imports System.Data.OleDb
Public Class Form4
    Dim connstr As String, dset1 As DataSet, adp As OleDbDataAdapter
    Dim dv As New DataView

    Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        connstr = "Provider=microsoft.jet.oledb.4.0;data source=" & Application.StartupPath & "\Test_Evren.mdb"
        adp = New OleDbDataAdapter("Select * from Tablo1;", connstr)
        dset1 = New DataSet
        adp.Fill(dset1, "Tablo1")
        dv.Table = dset1.Tables("Tablo1")
        'Filtre yapılıyor.
        'dv.RowFilter = "Adi_soyadi like 'D*'"
        Me.GridControl1.DataSource = dv
        Me.GridControl1.Controls.Item(1).BackColor = Color.Blue
        For i = 0 To 5
            If i Mod (2) = 0 Then
                Me.GridControl1.BackColor = Color.AliceBlue
            Else
                Me.GridControl1.Controls.Item(1).BackColor = Color.DarkOrange
            End If

        Next
        Me.GridView1.Columns("ID").Width = 20
        Me.GridView1.Columns("ID").AppearanceCell.BackColor = Color.Blue
        Me.GridView1.Columns("Adi_Soyadi").AppearanceCell.BackColor = Color.Red
        Me.GridView1.Columns("KG").AppearanceCell.BackColor = Color.Red
        Me.GridView1.Columns("ID").AppearanceCell.ForeColor = Color.Yellow
        Me.GridView1.Columns("Adi_Soyadi").AppearanceCell.ForeColor = Color.Yellow
        Me.GridView1.Columns("KG").AppearanceCell.ForeColor = Color.Yellow
        Me.GridView1.Columns("ID").Width = 100
    End Sub

    Private Sub GridControl1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GridControl1.Click

    End Sub

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        dv.RowFilter = "Adi_soyadi like '" & TextBox1.Text & "*'"
        Me.GridControl1.DataSource = dv
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim currentCursor As Cursor = Windows.Forms.Cursor.Current
        Windows.Forms.Cursor.Current = Cursors.WaitCursor
        If DevExpress.XtraPrinting.PrintHelper.IsPrintingAvailable Then
            DevExpress.XtraPrinting.PrintHelper.ShowPreview(GridControl1)
        Else
            MessageBox.Show("Raporlama yapılamadı...", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information)
        End If
        Windows.Forms.Cursor.Current = currentCursor
    End Sub
End Class