Liebe Gemeinde,
versuche ein DGV zu filtern ohne Erfolg.
Hier mein Code:
Konnte sein das hier der Fehler ist?
Danke im Voraus
toto
versuche ein DGV zu filtern ohne Erfolg.
Hier mein Code:
VB.NET-Quellcode
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Dim bs As New BindingSource
- Dim tbl As DataTable
- 'Dim cmd As OleDbCommand
- 'Dim datatable As DataTable
- Dim path As String
- path = "C:\Users\a.mazza\Desktop\Lampen Konfigurator\Kunden ECO.xlsx"
- Using connection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & path & ";Extended Properties=Excel 12.0;")
- connection.Open()
- Using DataAdapter = New OleDbDataAdapter("Select * From [Tabelle1$]", connection)
- tbl = New DataTable("Tabelle1")
- bs.DataSource = tbl
- DataAdapter.Fill(tbl)
- DGV1.DataSource = bs
- End Using
- End Using
- End Sub
- Private Sub TextBox1_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox1.TextChanged
- bs.Filter = "PLZ Like '" & TextBox1.Text & "'"
- End Sub
Konnte sein das hier der Fehler ist?
Danke im Voraus
toto
lg toto