Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What event fires when column gets focus?
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01575796
Message ID:
01575805
Views:
58
>>Hi everybody,
>>
>>Do you know what event fires when we enter a grid's column?
>>
>>If it's BeforeRowColChange then how can we know the name of the column we're about to enter?
>>
>>Thanks in advance.
>
>The object inside the column should get the focus so it's GotFocus event will fire:
>
>
>loForm			= CreateObject('myForm')
>loForm.Show(1)
>
>define class myForm as Form
>	add object myGrid as Grid
>	
>	function load() as Boolean
>		local i
>		
>		create cursor myCursor (PK I Autoinc, SomeValue C(10))
>		for i = 1 to 20
>			insert into myCursor (SomeValue) values (Sys(2015))
>		next i
>		return .t.
>	endfunc
>	
>	function init() as Boolean
>		BindEvent(thisform.myGrid.Column2.Text1, 'GotFocus', thisform, 'gridTextGotFocus')
>	endfunc
>	
>	procedure gridTextGotFocus()
>		MessageBox('Text1 in Column2 got the focus')
>	endproc
>		
>
>enddefine
>
I have the combobox in that column. The column is not bound and sparse = true. Only current row shows as combobox. In any case, the AfterRowColChange event seems to work for me. I needed to requery the combo.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform