ReadMe.txt file for UDGrid.zip

Pete's UDGrid class

Peter Rorlick's user-definable grid class.
This is a grid object with user-definable layouts and sort orders.
It lets the user create and/or select layouts at runtime by 
right-clicking on the grid.

How to run the demo:
  Unzip UDGrid.zip into a new folder, switch to that folder in VdB7,
  and run Demo.wfm.

How to use the UDGrid class:
  Design a new form, and set the Custom Form Class to ZForm which is in the
  file ZControl.cc.  (UDGrid requires zForm or an equivalent base form class
  that automatically runs any Init methods of the form and all its controls.)
  Drop a UDGrid onto the form designer surface, and datalink it to a rowset.
  Hit F12 to edit the form's source code, and just before the ENDCLASS, add:
    Proc Init
      form.udGrid1.NameOfTableContainingLayoutDefinitions = "???"
      form.udGrid1.NameOfTableContainingSpecialGridColumnDefinitions = "???"
  (You must specify actual filename prefixes, instead of "???". These 
  files do not have to already exist, because they will be created
  for you automatically when you right-click on the grid.)
  The NameOfTableContainingSpecialGridColumnDefinitions property is optional,
  so you can omit that line if you like.  But if you omit it, you can't
  create any custom columns; your choices will be limited to the fields of
  the rowset.

Custom columns:
  Custom columns give you fine control over the width and headings of
  columns.  They also let you create calculated fields that can be
  shown in the grid.  All of this can be established or changed at runtime!
How to add custom columns:
  When you're editing (or adding) a layout definition, 
  double-right-click on the Preview button. This will give you a dialog
  that lets you add (or edit or delete) new custom column definitions.
  The definitions you create in the ColumnDef field must conform to the
  following format:  {cExpression [,nWidth [,cCaption [,nEditorType]]]}
  where cExpression can be a field name or a beforeGetValue expression 
  for a calculated field that will be created automatically on-the-fly. 
  Examples:
    {'Name',18,'Athlete'}
    {'Name',18}
    {'DateOfBirth',12,'Birth date'}
    {'edate11(this.parent["DateOfBirth"].value)',12,'Born'}
  The last example employs a UDF to convert the dates into user-friendly
  strings such as "1953 Jan 31".

