Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Comboboxes in Grid are blanked
Message
De
12/05/2018 07:26:24
 
 
À
11/05/2018 14:54:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01659916
Message ID:
01659946
Vues:
49
>>Does a This.Refresh() in the grid's AfterRowColChange() method make any difference?
>>
>>Additionally: you're using a combobox because you want to allow your users to enter values not in the list?
>
>Using This,Refresh() in the grid's AfterRowColChange() method works fine when I move through the same row, but when I change rows, the comboboxes are blanked again.

Ok, Luis, let's try to reproduce the problem.
CREATE CURSOR TestData (FirstCol Character(15), SecondCol Integer, ThirdCol Character(5))

INSERT INTO TestData VALUES ("Hello", 1, "One")
INSERT INTO TestData VALUES ("World", 2, "Two")
INSERT INTO TestData VALUES ("howdy", 3, "Three")

GO TOP

LOCAL TestForm AS Form

m.TestForm = CREATEOBJECT("Form")

m.TestForm.AddObject("TheGrid", "_Grid")

WITH m.TestForm.TheGrid AS Grid

	.ColumnCount = 3
	.RecordSource = "TestData"

	WITH .Columns(3) AS Column
		.RemoveObject("Text1")
		.AddObject("Combo1", "DropDownList")
		.CurrentControl = "Combo1"
		.Sparse = .F.
	ENDWITH

	.Visible = .T.

ENDWITH

m.TestForm.Show(1)

BROWSE

DEFINE CLASS _Grid AS Grid

	* we may need this later on

ENDDEFINE

DEFINE CLASS DropDownList AS ComboBox

	FUNCTION Init

		This.AddItem("One")
		This.AddItem("Two")
		This.AddItem("Three")

		This.Style = 2

	ENDFUNC

ENDDEFINE
Is this working like you're intending?
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform