Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refresh cell in a grid
Message
 
 
À
25/07/2001 12:34:58
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00535086
Message ID:
00535134
Vues:
21
>>>>Hi everybody,
>>>>
>>>>I have a combobox in my grid called cboTown. When I change towns, I want to change ccode as well. I have this code in InteractiveChange (and the similar one in LostFocus):
>>>>
>>>>
this.parent.parent.column2.text1.value=curTowns.ccode
>>>>
>>>>However, the new ccode is not refreshed until I move focus from town combo to another field. How can I show this change immediatelly?
>>>
>>>Nadya,
>>>Try :
>>>this.value=this.value
>>>as first line.
>>>Cetin
>>
>>Didn't work :( There are other strange anomalies :( First, when I move focus to another field, the whole record is not selected (it's supposed to be, seems it's based on highlighted grid). If I change ccode, say, from 02 to 10 using towns combo and I move to another field, I'm sitting on the wrong record, which is not highlighted. The correct record is in the bottom of the grid (the table is sorted by situs) and it's highlighted!
>>
>>Also when I close the form and try to modify the class AddrInGrid, which I use in a Grid, I get "Class is in use" message. Why it could be, since the form is closed? I checked DS, but there is no holding DS.
>
>Nadya,
>Combo's and grid's rowsources ?
>Cetin

Combo is set RowSourceType=3 I do in its init: RowSource='select .. into cursor curTowns'. Grid is initialized in run-time. Do I need to explicitly close curTowns in form's destroy? As I said, I checked typing set command and there is only default DS with no tables in it. Besides, it's not a comboclass, which is still in use, it's a addrInGrid class. I put this code in Grid.Init:
local lnWidth
with this
    do case    
	case thisform.ProcType='trxnproc'
	    .column3.RemoveObject('text1')  
	    .column3.CurrentControl='cbotown1'
		lnWidth=.columns(11).width
		.deletecolumn(11) && MapRef
		.width=.width-m.lnWidth
	
	case thisform.ProcType<>'prclproc'
	    .column3.RemoveObject('text1')  
	    .column3.CurrentControl='cbotown1'
		lnWidth=.columns(4).width
		.deletecolumn(4) && PStreet
		.width=.width-m.lnWidth
		
	otherwise && Parcel Processing	 
   	    .column3.RemoveObject('cbotown1') 
   	    .column3.width=.column3.width/2
   	    use in select('curTowns') 
	endcase
endwith
dodefault()
Do you have suggestions about other problems I described? I was thinking, it's simple to add a combo to a grid and make it work, but it gives me so many undesired effects, what I'm frustrated :(
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform