Hi
I have a listbox on a windows form that i want to populate with items from a dataview.
i have the following:
Dim dsDatabases As DataSet
Dim dtDatabases As DataTable
Dim dvDatabases As DataView
dsDatabases = GetDatabases()
dtDatabases = dsDatabases.Tables("Databases"
dvDatabases = dtDatabases.DefaultView
dvDatabases.RowFilter = "DBName LIKE 'CCRAccount_[%]' AND DBName LIKE '[%]dk'"
Me.ListBox1.DataSource = dvDatabases
Me.ListBox1.DisplayMember = "DBName"
Me.ListBox1.ValueMember = "DBName"
Me.ListBox1.Refresh()
...but unfortunately the listbox is empty!
i'm totally baffled, and i've hunted high and low to find an example or something in the online help and various forums, but nothing's helped. (i'm quite new at all this, in case this wasn't glaringly obvious!)
i'm probably missing something very basic here - any suggestions would be very much appreciated.
TIA
LFCfan
I have a listbox on a windows form that i want to populate with items from a dataview.
i have the following:
Dim dsDatabases As DataSet
Dim dtDatabases As DataTable
Dim dvDatabases As DataView
dsDatabases = GetDatabases()
dtDatabases = dsDatabases.Tables("Databases"
dvDatabases = dtDatabases.DefaultView
dvDatabases.RowFilter = "DBName LIKE 'CCRAccount_[%]' AND DBName LIKE '[%]dk'"
Me.ListBox1.DataSource = dvDatabases
Me.ListBox1.DisplayMember = "DBName"
Me.ListBox1.ValueMember = "DBName"
Me.ListBox1.Refresh()
...but unfortunately the listbox is empty!
i'm totally baffled, and i've hunted high and low to find an example or something in the online help and various forums, but nothing's helped. (i'm quite new at all this, in case this wasn't glaringly obvious!)
i'm probably missing something very basic here - any suggestions would be very much appreciated.
TIA
LFCfan