Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBoxes in Grids
Message
From
25/08/1999 13:20:20
Rex Mahel
Realm Software, Llc
Ohio, United States
 
 
To
24/08/1999 15:13:46
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00257032
Message ID:
00257538
Views:
23
>>I add the Combo to the column and deleting the Text1 object.
>>
>>VFP actually changes the CurrentControl automatically if the Combo is the only input control in the column.
>>
>
>Yes, you right, sorry.
>
>I make similar class, test it and don't get similar problem.
>Below the class code
>
>**************************************************
>*-- Class: combo_in_grid (c:\vstudio\vfp\combolib.vcx)
>*-- ParentClass: form
>*-- BaseClass: form
>*
>DEFINE CLASS combo_in_grid AS form
>
>
> DoCreate = .T.
> Caption = "Form1"
> Name = "combo_in_grid"
>
>
> ADD OBJECT grid1 AS grid WITH ;
> ColumnCount = 1, ;
> DeleteMark = .F., ;
> Height = 161, ;
> Left = 20, ;
> Panel = 1, ;
> RowHeight = 25, ;
> Top = 20, ;
> Width = 270, ;
> Name = "Grid1", ;
> Column1.Width = 163, ;
> Column1.Sparse = .F., ;
> Column1.Name = "Column1"
>
>
> ADD OBJECT combo_in_grid.grid1.column1.header1 AS header WITH ;
> Caption = "Header1", ;
> Name = "Header1"
>
>
> ADD OBJECT combo_in_grid.grid1.column1.combo1 AS combobox WITH ;
> BoundColumn = 2, ;
> ColumnWidths = "50,0", ;
> RowSourceType = 6, ;
> RowSource = "itty.cname,iid", ;
> ControlSource = "invm.ittyid", ;
> Height = 24, ;
> ColumnLines = .F., ;
> Left = 59, ;
> Top = 29, ;
> Width = 100, ;
> BoundTo = .T., ;
> Name = "Combo1"
>
>
>ENDDEFINE
>*
>*-- EndDefine: combo_in_grid
>**************************************************
>
>I'm in curious.

Your Combo.ControlSource should be moved to the Column1 object. When this happens, I have to select the table that is the ControlSource for the grid, and even then, I can't get to the first record, every time I click it, control goes to the last record.

What is going wrong?

Rex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform