>>You can use BINDVENT()
>
>Ok, I created a method gotfocus_msg method to call in the bindevent, however it doesn't seem to like retrieve the value from the grid cell. I get a message saying
>
>
>Property VALUE is not found
>
>
>Here is my bindevent
>
>**buildgridmethod
>....
>
>
> .column4.header1.caption = "How Much"
> .column4.header1.ToolTipText = 'How much consumed'
> .column4.width = 61
> .column4.Enabled = .t.
> .column4.Text1.DisabledBackColor = RGB(255,255,255)
> .column4.Text1.DisabledForeColor = RGB(0,0,0)
> .column4.controlsource = "crs_grid3.crshowmuch"
>
>
>BINDEVENT(thisform.g3.column4.Text1 ,[GotFocus], thisform, [gotfocus_msg],1)
>
>
>and here is my gotfocus_msg method that I want to call when the grid column4 gotfocus
>
>**gotfocus_msg method
>MESSAGEBOX('gotfocus'+STR(this.value),0,'')
>thisform.celloldvalue = this.Value
>
>
>I'm not sure if this the way I am suppose to do gotfocus and lostfocus bindevent, but it seems like it cannot resolve the value in grid cell. I'm I missing something here?
You're missing AEVENTS() in the GotFocus_Msg method to get a reference to the textbox.
See this
http://social.msdn.microsoft.com/Forums/en-US/visualfoxprogeneral/thread/3671ab73-de92-4d91-8178-708a6354b196 for samples.
If it's not broken, fix it until it is.
My Blog