>>>Hi,
>>>
>>>I have a grid bound to a cursor. I need to track which rows of the cursor user "touched" (made changes). So I am going to add a column CHANGED L to the cursor. Then when user makes any change in any column of the grid row I will set the value of CHANGED to .T.
>>>
>>>But how do I determined which cursor row is currently in focus/selected? That is, when user click in any column of the grid row, the cursor row does not actually move there.
>>>
>>>What would you suggest?
>>
>>You can use Column's control GotFocus and LostFocus or Valid events. E.g. in the GotFocus you save current value, in LostFocus or Valid you compare it with the saved value and set the flag using a replace command. It will update the current row which is the one that was touched.
>
>I know about GotFocus, LostFocus and other methods. But I didn't think that when I click into a cell the cursor row has moved. For example, if I click into a cell and then (on LostFocus) determine that the value has changed and then call the following:
>
>
>replace CHANGED with .T.
>
>
>I am not sure that the above will change the column CHANGED in the ROW corresponding to the cell value. You see what I mean?
Yes and it will change the corresponding row. In other words, once you clicked and started to change, it will be that ROW. If you just clicked, then it is not known.
If it's not broken, fix it until it is.
My Blog