DatePicker control in VFP grid doesn't show after picking date and column loses focus.

I am trying to use the Microsoft Date and Time Picker 6.0 ActiveX object in a VFP 9 gridview control. The control works when the cell/column has focus, but I cannot see the value in the cell after the focus moves to the next column. I have tried the SPARSE  property of the column, which hasn't made any difference.

What must I do to see the cell contents after the cell loses focus?

I've attached two images of the cell, one with focus, the other without.

Cell with Date Picker control in focus

Cell when focus has moved to another cell
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The Sparse property does work for native FoxPro controls only. ActiveX controls ignore it.

One possible solution could be to place two controls into the column and make active the ActiveX one when the cell has focus and the standard VFP textbox when you leave the column.

Another solution is to use native VFP calendar control. Source code is available here:

I didn't test above solutions.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
EffortlessAuthor Commented:
Thank you for your help, I did not realize that about ActiveX and Sparse.

I would like to try the two controls solution you suggest as a possible solution - which method/event(s) do you think I could use to set the CurrentControl property of the column? I wanted to try GotFocus on the column, but that doesn't exist...
EffortlessAuthor Commented:
Thank you pcelba, I was able to change the CurrentControl in the GotFocus of text1 to OleControl1, and then back to Text1 on LostFocus of OleControl1. This works!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.