Search code examples
sql-server-2012visual-foxpro

datepicker in grid using vfp 9.0


my working project is on visual fox-pro 9.0 , so i need design form in that, i am adding grid with following 2 columns, 1st column is text-box control and 2nd column is date-picker control

following steps i did it:

  1. i created new form
  2. added grid control
  3. added active x Microsoft date-picker control 6.0

but here is my problem,

  1. on focus only its showing date-picker but i want to show all the time when i open the form.
  2. changing row date affecting other row date also.
  3. with null or empty column means needs show blank.

please help me,I'm tried to searching how date-picker works in grid.


Solution

  • I would actually do a slight alternative to what you are proposing. I would take the default grid textbox control and allow it to always show the given "Value" existing, null, whatever. Then, in the double-click event of the textbox of the column have it call a stand-alone form that has the date-picker control, allow user to change date, and store it upon return (if so chosen).

    Otherwise, to properly show the calendar control you'll probably need to have a very large row-height, and change the grid columns "SPARSE" property to FALSE (show every time).