>>To All :
>>
>>I am trying to add a drop down list to a form with two columns.
>>
Vendors_id is a character field. It was pointing to the correct vendors_id.
I added BoundTo = .t. and it helped. No longer was the vendor_id of each record wiped clean (blank) as I stepped over it. Unfortunately the displayvalue is still a blank.
In the actual control the vendors come from an array which is a property of a Biz_Object. To cut down on complexity and to eliminate sources of possible error I "Select SQL'ed" against a temporay cursor.
I did however try RowSourceType = 3 and a SQL for the RowSource. It made no difference.
I have investigated this much further and posted it under a new thread "MultiColumn droplist remains blank - II". I found a work a round but cannot imagine why I have to use it.
Thank you very much.
>Don,
>ControlSource = "vendors_id"
>Whose vendors_id is it ? It's suspect this would depend on what the current alias is or is it a memvar if current alias doesn't have that field at all.
>I'd also set boundto = .t. and since this is populated from an SQL result I'd directly use the SQL as the rowsource.
>
>
>DEFINE CLASS vendors AS xcbochg
> BoundColumn = 2
> BoundTo = .t.
> ColumnCount = 2
> ColumnWidths = "120,80"
> ControlSource = "TargetAlias.vendors_id"
> ColumnLines = .F.
> Width = 133
> Name = "vendors"
>
> PROCEDURE Init
> with this
> .RowSourceType = 3
> .RowSource = ;
> "select vn_name,vendors_id from vendors "+;
> " into CURSOR crsVendors order by 1"
> endwith
> ENDPROC
>ENDDEFINE
>
Having SQL there would give you the flexibility directly querying any column (pointer moves in cursor). ie:Thisform.IsChanged() could directly use crsVendors.vendors_id or crsVendors.vn_name if need be instead of ..myCombo.List(), val(..myCombo.Value) etc
>Cetin
Best Regards
Don Simpson