Can not show Listbox.valuemember over 99?

suesicus

New member
Joined
Mar 28, 2008
Messages
3
Programming Experience
3-5
Hi, I have a problem with a databound listbox.. It seems that the listbox don't display numbers greater than 99..

My application stores missions with a certain number (a primary key as automatic idenditity seed in the db), when the number gets larger then 99 (100 or 101) it displays a star in the listbox instead of the number.

The listbox look like this:
*, value from db (value from db)
*, value from db (value from db)
99, value from db (value from db)
98, value from db (value from db)
97, value from db (value from db)
94, value from db (value from db)
93, value from db (value from db)

I've debugged it and found out that DT that I use as a DataSource shows 100 and 101 correctly. So there must be some kind av limit in the listbox or something.

My code for populating the listbox:
Dim DT As New DataTable
Dim TempDT As DataTable
' DT is correct!
DT = DBconn.GetDataTable(Command)

TempDT = DT.Copy

TempTable = TempDT.DefaultView

lbxArenden.DisplayMember = "LITEXT"
lbxArenden.ValueMember = "ORDERJOB_ID"

' I have tried to comment out this but it does not affect outcome
lbxArenden.DrawMode = DrawMode.OwnerDrawFixed

If lbxArenden.Items.Count > 0 Then
Dim TempItem As Integer
TempItem = lbxArenden.SelectedValue
lbxArenden.DataSource = DT
lbxArenden.SelectedValue = TempItem
Else
lbxArenden.DataSource = DT
End If


Anyone who has some magic?
 

Attachments

  • 100-problem.JPG
    100-problem.JPG
    40.1 KB · Views: 22
Owner draw

Hi, thanks for replying.. and yes, I've tried to comment out the ownerdrawn. Have made evertything to "default" setting and still I get the issue with ValueMembers over 99... Think it's a setting or something that I don't know about..

By the Way.. The Selected Value (100, 101 etc is correct, It doesn't display i though)

/J
 
Back
Top