ListBox can only have character values as their columns, as I recall.
So, I suggest to stick with the characters.
>Hello,
>
>I'm having a problem getting numeric data to stay numeric in a ListBox. I have a 3 column array which I am using as the rowsource and the data types are Col1-Char, Col2-Char, Col3-Numeric. The 3rd column is being converted to Character in the ListBox. I've tried this with BoundTo set to .T. and .F. with the same result.
>
>Here is an example of my code, and the data result:
>
>this.lstChoices.rowsourcetype = 5 &&array
>this.lstChoices.rowsource = "aChoices" &&array
>this.lstChoices.BoundColumn = 3
>this.lstChoices.ColumnCount = 3
>this.lstChoices.ColumnWidths = "50,400,0"
>this.lstChoices.NumberOfElements = 3
>
>Data
>aChoices[1,1] "Tom " C
>aChoices[1,2] "Smith " C
>aChoices[1,3] 145 N
>
>Result
>this.lstChoices.List(1,1) "Tom " C
>this.lstChoices.List(1,2) "Smith " C
>this.lstChoices.List(1,3) " 145" C
>
>
>I know I can just convert the numeric data in the array to character data and work with it that way, but I prefer not to have to do that and I very interested to find out what I'm doing wrong.
>
>Thanks in advance,
>Larry
If it's not broken, fix it until it is.
My Blog