How To validate/format dates in Grids

From PxPlus

Jump to: navigation, search

Control Date Entry

To add date formatting in a Grid you'll need to do some setup in the Grid control's Cell Logic tab.

Start with adding the Validation Logic. To use the PxPlus date routines add *win/date;validate.

To display a date use the Display Logic entry where you add *win/date;display.

Now any date entered will be validated and displayed by the default date routines in *win/date.

Changing Formats

In the On Focus Logic field select Execute from the drop down list. Now enter the Grid Name plus the string ".TAG$=" and append the desired format. Example: Grid_Name.TAG$="FMT=DD/MM/YYYY,DAY1ST" or "FMT=%Ml %D %Yl"

File:GRID_1_FMT.jpg


In this example every row in column 1 is set with a different format.

File:Date_Grid.jpg

Personal tools