我正在尝试向我的datagridview添加行过滤器,但是我没有数据源。如何将我(已存在的数据)添加到数据源?
For Each th As HtmlElement In tHeaders
DataGridView1.Columns.Add(New DataGridViewTextBoxColumn With {.HeaderText = th.InnerText})
Next
For i = 2 To tRows.Count - 1
Dim r As New DataGridViewRow
For Each td As HtmlElement In tRows(i).GetElementsByTagName("td")
r.Cells.Add(New DataGridViewTextBoxCell With {.Value = td.InnerText})
Next
DataGridView1.Rows.Add(r)
Next
我确实知道如何使用rowfilter函数,但为了工作,我相信我需要一个数据源。如果我误会,我想知道:)