Hi,
I have a ComboBox of +- 15.000 items in it, via a DataSource. On Top of the
Items-list, I want to add some values, based on a user choise (via a filter
on the DataSource). Does anybody know how I can do this? When just adding
them with ComboBox.items. Insert I get an "Items collection cannot be
modified when the DataSource property is set".
Does anybody has a solution for this? i'm surely not the first to do this
:-) I'm using VB.NET 2005 Beta 2.
Thanks a lot in advance,
Pieter
This is my source:
Dim dtbl As New DataTable
dtbl = MyWorkSpace.Get AllArticlesClie nt(61)
Dim dtv As New DataView(dtbl)
dtv.Sort = "NomArticle "
Dim dtvF As New DataView(dtbl)
dtvF.RowFilter = "NomArticle LIKE '*HUILE*'"
dtvF.Sort = "NomArticle "
Me.cmbTest.Data Source = dtv
Me.cmbTest.Disp layMember = "NomArticle "
Me.cmbTest.Valu eMember = "CodeArticl e"
Dim intX As Integer
For intX = (dtvF.Count - 1) To 0 Step -1
cmbTest.Items.I nsert(0, dtvF.Item(intX) )
Next