TAdvStringGrid documentation (v1.87) © by TMS software
Info - Installation - Procedures - Properties - Events - Main page

Info

TAdvStringGrid is now released as v1.87. We want to thank all users for their input, either reporting problems or giving usefull suggestions for enhancements. We always look forward to hear your inputs and requests for features to enhance the component even more.
TAdvStringGrid is free for use in non-commercial applications, that is applications which are not being sold in any form or applications that are not used for commercial or profitable purposes. Source code and single developer license are available for 60USD. Registered users are entitled to free source code updates for a full version cycle (ie. version x,y to version x+1,y) and support by email within 24hrs. You can do online registration for TAdvStringGrid through the ShareIt service. For other payment possibilities contact TMS software at : info@tmssoftware.com
Installation

Delphi 1, Delphi 2 : In the Options menu, select Install component, Add and browse for asgreg.pas
Delphi 3, Delphi 4, Delphi 5 : In the Component menu, select Install component, Into new package, browse for asgreg.pas and choose package name.
C++Builder 1.0 : In the Options menu, select Install component, Add and browse for asgreg.pas.
C++Builder 3.0 : In the Component menu, select Install component, Into new package, browse for asgreg.pas and choose package name.
C++Builder 4.0 : In the Component menu, select Install component, Into new package, browse for asgreg.pas and choose package name.

Important Remark : When installing newer versions of the component, make sure to update ALL your form files that used the previous version of TAdvStringGrid before recompiling your application to make sure all new properties are available. You can update the form file by opening it, ignoring remarks about new properties and save the form. For C++Builder users, make sure no old copies of advgrid.obj or advgrid.hpp remain in the linker path.

Procedures
procedure ClearRows(RowIndex, RCount: LongInt);
Description : clears contents of all cells starting from row RowIndex to RowIndex+Rcount-1.
procedure ClearCols(ColIndex, CCount: LongInt);
Description : clears contents of all cells starting from row ColIndex to ColIndex+Ccount-1.
procedure ClearRect(aCol1,aRow1,aCol2,aRow2:integer);;
Description : clears contents of all cells in rectangle indicated by [aCol1,aRow1] and [aCol2,aRow2].
procedure ClearNormalCells;
Description : clears contents of all cells except fixed cells.
procedure Clear;
Description : clears contents of all cells. No cells are removed, only content is cleared.
procedure ClearRowSelect;
Description : if DisjunctRowSelect is enabled, this method clears selection of all rows.
procedure SelectRange(FromCol,ToCol,FromRow,ToRow: Longint);
Description : Selects all cells in the rectangle specified by FromCol, ToCol, FromRow, ToRow.
procedure SelectRows(RowIndex, RCount: Longint);
Description : Selects RCount rows starting from RowIndex.
procedure SelectCols(ColIndex,CCount : Longint);
Description : Selects CCount columns starting from ColIndex.
procedure RemoveRows(RowIndex, RCount: LongInt);
Description : removes all rows from the stringgrid, starting from row RowIndex to row RowIndex+RCount-1.

procedure InsertRows(RowIndex, RCount: LongInt);
Description : inserts Rcount empty rows at row position RowIndex.
procedure RemoveCols(ColIndex, CCount: LongInt);
Description : removes all columns from the stringgrid, starting from column ColIndex to column ColIndex+CCount-1.
procedure InsertCols(ColIndex, CCount: LongInt);
Description : inserts Ccount empty columns after column position ColIndex.
procedure MergeCols(ColIndex1, ColIndex2: LongInt);
Description : Appends strings from column 2 to strings of column 1 and removes column 2.
procedure SwapColumns(aCol1,aCol2:longint);
Description : swaps contents of all cells of column 1 and column 2.
procedure MoveColumn(FromIndex,ToIndex:longint);
Description : move contents of all cells of column FromIndex to column ToIndex.
procedure MoveRow(FromIndex,ToIndex:longint);
Description : move contents of all cells of row FromIndex to row ToIndex.
procedure HideColumn(ColIndex:longint);
Description : hide display of column=colindex.
procedure HideColumns(FromCol, ToCol:longint);
Description : hides all columns from FromCol to ToCol.
procedure UnhideColumn(ColIndex:longint);
Description : shows a hidden column=colindex again.
procedure UnhideColumns(FromCol, ToCol:longint);
Description : shows all hidden columns from FromCol to ToCol again.
procedure UnhideColumnsAll;
Description : shows all hidden columns again.
function IsHiddenColumn(ColIndex:longint):boolean;
Description : returns true if column=colindex is hidden.
function NumHiddenColumns:integer;
Description : returns the number of hidden columns.
procedure HideRow(rowindex:integer);
Description : hide display of row=rowindex.
procedure HideRows(fromrow,torow:integer);
Description : hides all rows from FromRow to ToRow.
procedure UnHideRow(rowindex:integer);
Description : shows a hidden row=rowindex again.
procedure UnHideRows(fromrow,torow:integer);
Description : shows all hidden rows from FromRow to ToRow again.
procedure UnHideRowsAll;
Description : unhides all current hidden rows.
function IsHiddenRow(rowindex:integer):boolean;
Description : returns true if row is hidden.
function NumHiddenRows:integer;
Description : returns the number of hidden rows.
function RealRowIndex(arow:integer):integer;
Description : returns the real row index of the visible row index. If the number of hidden rows is 0, the real row index is always equal to the display row index. With hidden rows, the real row index of all rows after a hidden row will be incremented with the number of hidden rows before that row.
function RealColIndex(arow:integer):integer;
Description : returns the real column index of the visible column index. If the number of hidden columns is 0, the real column index is always equal to the display column index. With hidden columns, the real column index of all columns after a hidden column will be incremented with the number of hidden columns before that column.
function DisplRowIndex(arow:integer):integer;
Description : Inverse function of RealRowIndex. Returns the display row index for a given row index.
function DisplColIndex(arow:integer):integer;
Description : Inverse function of RealColIndex. Returns the display column index for a given column index.
procedure SwapRows(aRow1,aRow2:longint);
Description : swaps contents of all cells of row 1 and row 2.
function Findfirst(s: String; findparams: TFindParams):tpoint;
Description : searches the stringgrid for text s, with options for search in findparams. This set is defineed as :
TFindParameters = (fnMatchCase,fnMatchFull,fnMatchRegular,fnDirectionLeftRight,
fnFindInCurrentRow,fnFindInCurrentCol,fnAutoGoto,fnIncludeFixed).
TFindParams = set of TFindParameters;
FindFirst returns col/row of first cell matching the search specification. If no cell is found, the returned cell is (-1,-1)
For easy of use, there is a FindBusy property indicating whether the find has reached the end of the grid.
function FindNext : tpoint;
Description : continues the search in the grid for text initiated by FindFirst.
For easy of use, there is a FindBusy property indicating whether the find has reached the end of the grid.
procedure LoadFromFile(FileName: String);
Description : loads contents as well as size of the stringgrid from a ASCII file previously created by calling the SaveToFile routine.
procedure SaveToFile(FileName: String);
Description : saves contents as well as size of the stringgrid to a ASCII file so it can be restored later by calling the LoadFromFile routine.
procedure LoadFromStream(Stream: TStream);
Description : loads contents as well as size of the stringgrid from a generic stream. For example, a filestream can be used to save contents to file or a memorystream to copy data from one stringgrid to another stringgrid.
procedure SaveToStream(Stream: TStream);
Description : saves contents as well as size of the stringgrid to a generic stream.
procedure SaveToHTML(FileName: String);
Description : saves contents of stringgrid as well as aligments in HTML format. Uses the HTMLSettings property for several formatting options
procedure SaveToXML(FileName, ListDescr, RecordDescr: String; FieldDescr : tstrings);
Description : saves contents of stringgrid as XML file. ListDescr specifies the XML list descriptor name, RecordDescr the record descriptor name and FieldDescr is a stringlist holding the field names for each column of the grid. Fixed columns and rows are not saved to XML.
procedure SaveToCSV(FileName: String);
Description : saves contents of stringgrid to a comma delimited text file. Use the delimiter property to save with tab, space or other separators. Use SaveFixedCells property to control saving of fixed cells.
procedure AppendToCSV(FileName: String);
Description : same as SaveToCSV except that this function adds grid data to the end of the file.
procedure LoadFromCSV(FileName: String);
Description : loads contents of stringgrid from a comma delimited text file.
procedure InsertFromCSV(FileName: String);
Description : same LoadFromCSV except that data is appended after the last row of the grid.
procedure SaveToASCII(FileName: String);
Description : saves contents of stringgrid to a formatted text file.
procedure LoadFromFixed(FileName:string;positions:tintlist);
Description : loads the contents of stringgrid from a formatted text file. The positions parameter is a list of the fixed offsets of the columns. Create a TIntList instance, and add the positions with the Add(position:integer) method.
procedure SaveToDOC(FileName: String);
Description : not for Delphi 1 ! Uses OLE automation to transfer cell contents to a MS Word DOC file with table.
procedure LoadFromXLS(Filename:string);
Description : not for Delphi 1 ! Uses OLE automation to transfer cell contents from XLS file with name Filename, loaded into Excel.
procedure SaveToXLS(Filename:string);
Description : not for Delphi 1 ! Uses OLE automation to transfer cell contents to Excel and save to XLS file with name Filename.
procedure SaveColSizes;
Description : saves the column sizes to the registry location specified in the ColumnSize property.
procedure LoadColSizes;
Description : loads the column sizes from the registry location specified in the ColumnSize property.
procedure SavePrintSettings(key,section:string);
Description : saves the current printsettings in the registry at location key,section.
procedure LoadPrintSettings(key,section:string);
Description : loads the printsettings from the registry location key,section.
procedure CutToClipboard;
Description : copies contents of stringgrid to the clipboard and clears all cells.
procedure CopyToClipBoard;
Description : copies contents of stringgrid to the clipboard.
procedure CopySelectionToClipboard;
Description : copies contents of selected cells to the clipboard.
procedure PasteFromClipboard;
Description : pastes data from clipboard into cells.

procedure PasteSelectionFromClipboard;
Description : pastes data from clipboard into cells at current selected cell at position row,col.
procedure AutoSizeCol(const ACol: LongInt);
Description : modifies the width of column ACol so that all text properly fits in the column.
procedure AutoSizeColumns(DoFixedCols:boolean;padding:integer);
Description : modifies the width of all columns (except fixed columns if specified) so that all text properly fits in the columnn and optionally adds extra space specified in the padding parameter.
procedure AutoSizeRow(const ARow: LongInt);
Description : modifies the height of row ARow so that all text properly fits in the row. Only required when using the grid in multiline mode.
procedure AutoSizeRows(const DoFixedRows: Boolean; const Padding: Integer);
Description : modifies the height of all rows (except fixed rows if specified) so that all text properly fits in the rows. Only required when using the grid in multiline mode. Optionally adds extra space specified in the padding parameter.
procedure AutoSizeCells(const DoFixedRows: Boolean; const PaddingX, PaddingY: Integer);
Description : modifies the width and height of all cells (except fixed rows if specified) so that all text properly fits in the cells. Optionally adds extra space at right and bottom as specified in the PaddingX and PaddingY parameters.
procedure AutoNumberCol(const ACol:longint);
Description : simple autonumbering of cells in a column starting from 1 in first non-fixed row.
procedure QSort;
Description : performs a complete quicksort of the stringgrid, starting from the column indicated by the SortColumn property.
procedure QSortIndexed;
Description : performs a quicksort of the stringgrid, in the sequence of the column indexes found in the SortIndexes property.
procedure Print;
Description : prints the entire stringgrid to the selected printer, using the printer setting properties of TAdvStringGrid.
procedure PrintRect(gridrect:tgridrect);
Description : prints only the cells in gridrect to the selected printer, using the printer setting properties of TAdvStringGrid.
procedure PrintPreview(canvas:tcanvas;displayrect:trect);
Description : shows a preview of the printout with exactly the same printer setting properties in the selected canvas in the rectangle defined by displayrect.
procedure PrintPreviewRect(canvas:tcanvas;displayrect:trect;gridrect:tgridrect);
Description : shows a preview of the printout with exactly the same printer setting properties in the selected canvas for the cells in gridrect.
procedure SortByColumn(col:integer);
Description : sort the column col and set SortColumn property to col.
procedure QuickSort(col,left,right:integer);
Description : perform a quicksort of all cells from row left to row right for a given column col.
procedure Search(s:string):longint;
Description : return the first cell containing the string s, or partially matching string s.
procedure HideSelection;
Description : hides the selected cell.
procedure AddImageIdx(Acol,Arow,aIdx:integer;hal:TCellHalign;val;TCellValign);
Description : not for Delphi 1 : adds an image idx from the imagelist assigned to GridImages to cell Acol,Arow with alignment defined by hal and val.
hal = (haLeft,haCenter,haRight,haBeforeText,haAfterText)
val = (vaTop,vaCenter,vaBottom,vaAboveText,vaUnderText)

procedure RemoveImageIdx(Acol,Arow:integer);
Description : not for Delphi 1 : removes the image from cell aCol, Arow. Note : it is not necessary to remove the image
at the cell, before adding a new image, since AddImageIdx automatically cleans up previously assigned images.
function GetImageIdx(Acol,Arow:integer;var idx:integer):boolean;
Description : not for Delphi 1 : returns true if the cell aCol, Arow contains an image from the imagelist. In the idx parameter, the actual index of the image in the imagelist is returned.
procedure AddDataImage(Acol,Arow,Aidx:integer;hal:TCellHalign;val:TCellValign);
Description : not for Delphi 1 : adds a cell data dependent image to a cell. The alignment is equal to the alignment in AddImageIdx. Aidx specifies the index from where to start in the imagelist. Ie. if cell[acol,arow] contains 5 and Aidx=2, image 7 from the imagelist will be displayed.
procedure RemoveDataImage(Acol,Arow:integer);
Description : not for Delphi 1 : removes the image from cell aCol, Arow. Note : it is not necessary to remove the image
at the cell, before adding a new image, since AddDataImage automatically cleans up previously assigned images.

procedure AddBitmap(Acol,Arow:integer;Abitmap:tBitmap;transparent:boolean;hal:TCellHalign;val;TCellValign);
Description : adds a bitmap to cell Acol,Arow with alignment defined by hal and val. The transparent parameter controls display the bitmap transparently. Transparency color is determined by the pixel in the upper left corner of the bitmap.

procedure RemoveBitmap(Acol,Arow:integer);
Description : removes the bitmap in cell Acol,Arow
function GetBitmap(aCol,aRow:integer):tbitmap;
Description : returns the bitmap object in cell Acol,Arow
procedure AddIcon(Acol,Arow,aIdx:integer;hal:TCellHalign;val;TCellValign);
Description : adds an icon to cell Acol,Arow with alignment defined by hal and val.

procedure RemoveIcon(Acol,Arow:integer);
Description : removes the icon from cell Acol,Arow
procedure AddProgress(Acol,Arow:integer;FGColor,BKColor:TColor);
Description : adds a progress bar graphic to a cell Acol, Arow with foreground and background colors specified in the FGColor and BGColor parameters. The progressbar position reflects the cell value which should be between 0 and 100.
procedure RemoveProgress(Acol,Arow:integer);
Description : removes the progressbar graphic from cell Acol,Arow
procedure AddComment(Acol,Arow:integer;comment:string);
Description : adds a comment indicator to cell Acol, Arow with text comment that will popup when mouse is over the cell.
procedure RemoveComment(Acol,Arow:integer);
Description : removes the comment indicator from cell Acol,Arow
procedure AddRotated(Acol,Arow:integer;aAngle:smallint;s:string);
Description : not for Delphi 1 : adds rotated text to a cell with aAngle specified in degrees (0°-360°). The rotated text uses additionally the alignment specified through the VAlignment property and horizontal cell alignment specified through the OnGetAlignment event handler and font, color settings through the OnGetCellColor event handler.
procedure RemoveRotated(Acol,Arow:integer);
Description : not for Delphi 1 : removes text rotation information from the cell.
function IsRotated(Acol,Arow:integer;var aAngle:smallint):boolean;
Description : not for Delphi 1 : if the cell contains rotation information, returns true and the angle of rotation in degrees (0°-360°)
procedure AddMultiImage(Acol,Arow,Dir:integer;hal:TCellHalign;val;TCellValign);
Description : not for Delphi 1 : adds a multi image cell to the grid. The indexes of the images in the image list are specified through the CellImages property. This property is an integer list, holding the indexes of the multiple images in the GridImages image list. The direction parameter is 0 for horizontal positioned multiple images and 1 for vertical positioned images.
procedure RemoveMultiImage(Acol,Arow:integer);
Description : not for Delphi 1 : removes the multi image cell from the grid.
procedure AddNode(aRow,Span:integer);
Description : adds a node at visible row aRow to the grid, with span indicating the number of rows it contracts or expands
procedure RemoveNode(aRow:integer);
Description : removes the node from visible row index aRow.
function IsNode(aRow:integer):boolean;
Description : returns true if visible row index aRow contains a node
function GetNodeState(ARow:integer):boolean;
Description : returns true if the node at visible row index aRow is in the expanded state
procedure SetNodeState(ARow:integer;value:boolean);
Description : sets the node state at visible row index aRow to the expanded state if true, to the contracted state if false.
procedure ExpandNode(aRow:integer);
Description : expands the node at real row index aRow
procedure ContractNode(aRow:integer);
Description : contracts the node at real row index aCol
procedure ExpandAll;
Description : expands all nodes in the grid
procedure ContractAll;
Description : contracts all nodes in the grid
procedure AddRadio(aCol,aRow,DirRadio,IdxRadio:integer;sl:tstrings);
Description : adds a radiobutton to grid cell aCol,Arow. If DirRadio is true, the radiobuttons are in the vertical direction, otherwise it is in the horizontal direction. IdxRadio determines the selected radiobutton group item, while the sl stringlist holds the radiobutton labels.
procedure RemoveRadio(aCol,aRow:integer);
Description : Removes the radiobuttons from cell aCol, Arow
function IsRadio(Acol,Arow:integer):boolean;
Description : Returns true of cell aCol, Arow contains a radiobutton
function GetRadioIdx(Acol,Arow:integer;var IdxRadio:integer):boolean;
Description : Gets the index of the selected radiobutton in the radiobuttongroup at cell aCol, aRow
function SetRadioIdx(Acol,Arow,IdxRadio:integer):boolean;
Description : Sets the index of the selected radiobutton in the radiobuttongroup at cell aCol, aRow
procedure Zoom(nr:integer);
Description : zoom in or out on stringgrid

procedure AddCheckbox(Acol,Arow:integer; state,data:boolean);
Description : adds a checkbox to cell Acol,Arow with checked status set to state. It's important to have property EnableGraphics set to show checkboxes ! If data is enabled, then the checkbox true or false condition depends on the cell content and the checkbox changes the cell content if it changes state. The values for true and false are determined by the properties Checktrue, CheckFalse.

procedure RemoveCheckbox(Acol,Arow:integer);
Description : removes the checkbox in cell Acol,Arow
function HasCheckbox(Acol,Arow:integer):boolean;
Description : returns true when cell Acol,Arow contains a checkbox.
function GetCheckboxState(Acol,Arow:integer; var state:boolean ):boolean;
Description : gets the status of the checkbox in cell Acol,Arow and returns in result in state. If cell Acol,Arow does not contain a checkbox, the function returns false.
function SetCheckboxState(Acol,Arow:integer; state:boolean ):boolean;
Description : sets the status of the checkbox in cell Acol,Arow. If cell Acol,Arow does not contain a checkbox, the function returns false.
procedure ClearComboString;
Description : removes all strings from the inplace combobox editor
procedure AddComboString(s:string);
Description : add string s to the the inplace combobox editor.
procedure SetComboSelection(idx:integer);
Description : sets the current selected item to item idx in the combobox inplace editor. Can be called during the OnGetEditorType event to set default combobox items differently for each column or even cell.
procedure SetComboSelectionString(s:string);
Description : sets the current selected item to s in the combobox inplace editor. Can be called during the OnGetEditorType event to set default combobox items differently for each column or even cell.
procedure RemoveComboString(s:string);
Description : removes string s from the combobox item list.
function GetComboCount:integer;
Description : retrieves the number of items currently in the combobox.
function IsSelected(aCol,aRow:integer):boolean;
Description : returns true if the specified cell is within the selection range.
procedure RichToCell(aCol,aRow:integer;richedit:trichedit):boolean;
Description : Transfers text from the richedit control to cell ACol, Arow. RichEdit can be the internal rich edit control of TAdvStringGrid which can be accessed through the RichEdit property.
procedure CellToRichl(aCol,aRow:integer;richedit:trichedit);
Description : Transfers text from cell Acol, Arow to the richedit control. RichEdit can be the internal rich edit control of TAdvStringGrid which can be accessed through the RichEdit property.
procedure Group(colindex:integer);
Description : Groups the data in the grid by column ColIndex. It creates expand / contract nodes in column 0. Is equivalent to the use of the GroupColumn property.
procedure UnGroup;
Description : If grouping is active, ungroups.
procedure BeginUpdate;
Description : Temporarily stops painting the grid.
procedure EndUpdate;
Description : Reenables grid painting.
function GetVersionNr:integer;
Description : returns the version nr. The low order word is the minor version number, the high order word is the major version number.
function GetVersionString:string;
Description : returns the version + release date as a string.
function ColumnSum(ACol,FromRow,ToRow:integer):double;
Description : returns the sum of cell values in column ACol from row FromRow to row ToRow.
function RowSum(ARow,FromCol,ToCol:integer):double;
Description : returns the sum of cell values in column ARow from row FromCol to row ToCol.

Properties

property Ints[ACol,ARow:Integer]:integer;
Description : property to access the cells as integers. Exception is raised when cell does not contain integer data and read is performed.
property Dates[ACol,ARow:Integer]:tdatetime;
Description : property to access the cells as TDateTime values. Exception is raised when cell does not contain a valid date string.
property AllCells[ACol,ARow:Integer]:string;
Description : property to access all the grid cells when working with hidden rows as if the hidden rows are not in the grid. Use the AllCells[aCol,aRow] property to access all the cells and the Cells[aCol,aRow] property to access the visible cells only.
property StrippedCells[ACol,ARow:Integer]:string;
Description : property to access all the grid cells as plain text when working with HTML formatted cells. The StrippedCells property returns the text of a cell with all formatting removed. This is a read-only property.
property RealCol:integer;
Description : Read only property, returning the real column index of the current selected column, ie takes hidden columns into account.
property RealRow:integer;
Description : Read only property, returning the real row index of the current selected row, ie takes hidden rows into account.
property AutoSize:boolean;
Description : setting the Autosize property to true, resizes all columns to widths so that all text just fits.
property EnhTextSize:boolean;
Description : If true, text in cells is appended with ... if it doesn't fit into the cell.
property EnhRowColMove:boolean; not for Delphi 1
Description : If true, shows column or row header while dragging it into the new position.
property EnableGraphics:boolean;
Description : If false, users can store non-objects to string Objects[] property.
property FixedColWidth:integer;
Description : Property to set the width of the fixed column which can otherwise not be set during design time.
property FixedRowHeight:integer;
Description : Property to set the height of the fixed row which can otherwise not be set during design time.
property SizeWithForm:boolean;
Description : If true, the stringgrid resizes itself when the parent form also resizes.
property Multilinecells:boolean;
Description : If true, multiline cells are supported. Multiline text can be entered in cells by using the #13 line separator. For example : 'this is a'#13'multiline text' will be displayed as two lines when enabled.
Warning : the line separator might change to #10 in future versions.
property SortColumn:integer;
Description : When the SortColumn property is set, the specified column is sorted. Can also be used to readback which column the user has clicked to sort.
property SortShow: boolean;
Description : If true, sorting when clicking on column headers is enabled and the triangle sort indicators are displayed in the column headers.
property SortFixedCols: boolean;
Description : If true, sorts fixed columns too when clicked.
property SortDirection:TSortDirection;
Description : Sets direction of sort globally for stringgrid.
TSortDirection = (sdAscending,sdDescending);
property SortFull:boolean;
Description : When true full sorting is enabled, ie. sorting on the SortColumn and subsorting on the columns right from the SortColumn. When false, sorting is limited to the SortColumn only.
property SortIndexes:TIntList;
Description : List of integer values determining the column sort order. If list is not assigned, default left to right sort order is assumed.
property Lookup: boolean;
Description : Enable autolookup edit controls in grid, based on stringlist LookupItems.
property LookupHistory: boolean;
Description : Enable automatic history list building for lookup edit control.
property LookupCaseSensitive: boolean;
Description : When true, the lookups performed are case sensitive.
property LookupItems: tStringList;
Description : Items for auto lookup of inplace edit controls.
property HintColor:tcolor;
Description : Sets the color of the hints appearing in the stringgrid. This does not modify color of hints on other components on the same form.
property PrintSettings:TPrintSettings;
Description : Property to hold all printout settings :
property Time: TPrintPosition; : sets position on page of time of printout.
property Date: TPrintPosition; : sets position on page of date of printout
property DateFormat : string; : holds the date formatting parameter. Default value is dd/mm/yyyy
property Title: TPrintPosition; : sets position of title of printout
property TitleText : string; : sets title of printout
property TitleLines : tstringlist : sets the multiline title of the grid (use this property instead of TitleText for multiline titles)
property TitleSpacing : integer; : sets distance in 1/10mm between title and first grid row
property Font: TFont; : sets font of printout
property HeaderFont : sets font for the header
property FooterFont : sets font for the footer
property JobName : sets title for print job in printer spooler
property Borders : TPrintBorders; : sets drawing method of borders for printout
property BorderStyle : TPenStyle; : line drawing style for border
property Centered : boolean; : if true, printout is centered on the page.
property RepeatFixedRows : boolean; : if true, printout of fixed rows is repeated on each page.
property RepeatFixedCols : boolean; : if true, printout of fixed columns is repeated on each page.
property FooterSize : integer : controls distance to skip at end of page in units of 1/10mm.
property HeaderSize : integer : controls distance to skip at start of page in units of 1/10mm.
property LeftSize : integer : controls distance to skip at left side of page in units of 1/10mm.
property RightSize : integer : controls distance to skip at right side of page in units of 1/10mm.
property ColumnSpacing : integer : controls distance to skip between 2 columns in units of 1/10mm.
property RowSpacing : integer : controls distance to skip between 2 columns in units of 1/10mm.
property Orientation : TPrinterOrientation : sets printer orientation to landscape or portrait
property PagePrefix : string : sets the prefix for page numbering for printout
property PageSuffix : string : sets the suffix for page numbering for printout
property PageNr: TPrintPosition; : sets position on page of page number
property PageNumSep:string; sets the separator between actual printed page and total nr. of pages. If PageNumSep is a zero length string, total number of pages is not printed. Default value is '/'
property FixedHeight : height of rows for printout in 0.1mm
property FixedWidth : width of columns for printout in 0.1mm
property UseFixedHeight : if enabled, uses value FixedHeight, else auto calculation is done
property UseFixedWidth : if enabled, uses value FixedWidth, else auto calculation is done
property NoAutoSize: if true, disables the automatic column sizing to optimize paper use and retain full column text visibility but uses column sizes proportional to column sizes on display.
property PrintGraphics: when true, graphics such as bitmaps, icons, imagelist elements are also printed.
property FitToPage: Controls various options to fit printing on a page.
- fpNever : never use page fitting.
- fpAlways : always fit to page, no matter what the scalefactor is
- fpGrow : only fit to page by increasing font size / column widths
- fpShrink : only fit to page by decreasing font size / column widths
- fpCustom : call the OnFitToPage event, to query for allowing pagefit with calculated scalefactor.
with
TPrintPosition = (ppNone,ppTopLeft,ppTopRight,ppTopCenter,ppBottomLeft,ppBottomRight,ppBottomCenter);
TPrintBorders = (pbNoBorder,pbSingle,pbDouble,pbVertical,pbHorizontal,pbAround,pbAroundHorizontal,pbAroundVertical);
TPrintOrientation = (poLandscape,poPortrait)
TFitToPage = (fpNever,fpGrow,fpShrink,fpAlways,fpCustom)
property Navigation:TNavigation;
Description : property to hold all settings of enhanced keyboard navigation in the grid
property AlwaysEdit:boolean; : shows the inplace editor always (must to be used when additional inplace editors are used instead of goAlwaysShowEdit)
property AllowInsertRow:boolean; : INS key will insert row if true
property AllowDeleteRow:boolean; : DEL key will delete row if true
property AdvanceOnEnter:boolean; : next cell is selected after pressing enter while editing current cell
property AdvanceInsert : if true, allows insertion of rows when last cell is entered when in AdvanceOnEnter mode
property AllowClipboardShortCuts:boolean; : if true, enables Ctrl-Ins, Shift Ins, Ctrl-Del keys or also Ctrl-V, Ctrl-X, Ctrl-C to perform clipboard actions
property AllowSmartClipboard:boolean; when true allows automatic replication of single cell to multiple cells through clipboard copy & paste, as well as 2 cell difference based auto increment paste for selected cells. Difference based auto increment works for numbers as well as dates.
property AutoGotoWhenSorted:boolean; : if true, allows jumping to rows with single keypress in sorted column.
property AutoGotoIncremental:boolean; : if true, allows jumping to rows by keypress in sorted column in incremental lookup mode.
property AutoComboDropSize:boolean; : automatically resize the inplace combobox editor dropdown size to match the max. text size of its items when true.
property AdvanceAuto:boolean; when using masked input, automatically advances to the next cell when masked edit is completed.
property ImproveMaskSel:boolean; immediately puts the caret in the first position for a mask edit input in the grid.
property InsertPosition: Can be either pInsertBefore or pInsertAfter. It determines if a row is inserted before or after the current row when pressing Ins with AllowAutoInsert enabled.
property CursorWalkEditor:boolean; when true, allows changing of the current edit cell to the next of previous cell when edit position is either at the end of the edit text and right cursor key is pressed or if edit position is in the beginning of the edit text and left cursor key is pressed.
property MoveRowOnSort : when true, moves the grid display to the new position of the active cell after sort.
property ColumnSize:TColumnSize;
Description : property to hold settings for saving column sizes.
property Save:boolean; : if true, column sizes are saved into registry or INI file.
property Key:string; : key in INI file or registry where sizes are stored
property Section:string; : section in INI file or registry where sizes are stored
property Stretch:boolean; : automatic stretching of rightmost column to full grid size
Note : for Delphi 2 & 3 registry is used, for Delphi 1, INI files are used.

property FixedFooters:integer;
Description : property to set number of fixed rows at bottom side of the grid
property FixedRightcols:integer;
Description : property to set number of fixed columns at right side of the grid

property FixedAsButtons:boolean;
Description : when true, the fixed cells behave as buttons

property GridImages:TImageList;
Description : property to set imagelist from which bitmaps are taken to display when using SetImageIdx / RemoveImageIdx functions.
property Delimiter:char;
Description : public only property to set delimiter character to use for functions SaveToCSV / LoadFromCSV, defaults to comma. Delimiter is default #0, which indicates that the grid will try to determine in an intelligent way the column delimiter. It checks characters , ; # TAB | @ '* - + and & to find the used delimiter.
property CheckTrue:string;
Description : public only property. Used with the DataCheckBox inplace editor. Reflects the value of the cell when the checkbox is checked.
property CheckFalse:string;
Description : public only property. Used with the DataCheckBox inplace editor. Reflects the value of the cell when the checkbox is not checked.
property PasswordChar:char;
Description : public only property. Determines which character is used in password cells. A password cell is defined through the event OnIsPasswordCell.
property HintShowCells:boolean; not for Delphi 1,2
Description : hints are full cell contents.
property SizeWhileTyping:TSizeWhileTyping;
Description : enables column sizing (vertical and/or horizontal) while typing text.
property Height:boolean; : change height of cell when text becomes too high for cell while editing (wordwrap mode)
property Width:boolean; change width of cell when text becomes too wide for cell while editing

property URLShow:boolean; not for Delphi 1
Description : makes grid URL-aware and displays clickable URLs in cells.
property URLEdit:boolean; not for Delphi 1
Description : URL editing enabled when right-clicking on the cell with a URL.
property URLFull:boolean; not for Delphi 1
Description : If true, displays full URL, ie including protocol prefix.
property URLColor:tcolor; not for Delphi 1
Description : color used to display URLs.
property Wordwrap;
Description : set normal inplace editing mode and display to automatic wordwrapping. EnhTextSize and MultilineCells property should be false if wordwrapping used.

property DateTimePicker:tDateTimePicker;
Description : Gives you access to all the properties of the inplace date / time editor. Can be used to set colors, min. and max. dates etc. Look at help of TDateTimePicker for all properties. not for Delphi 1,2.
property Combobox:TComboBox;
Description : Gives you access to all the properties of the inplace combobox editor. You can set sort, dropdowncount, style through this property.
property NormalEdit:TEdit;
Description : Exposes the normal inplace editor. Can be used to get the selected text from the inplace editor or to set additional properties if required.
property SelectionColor:TColor;
Description : sets the background color of selected cells.
property SelectionTextColor:TColor;
Description : sets the text color of selected cells.

property SelectionRectangle:boolean;
Description : draws rectangle with thick borders round selected cells.
property ShowSelection:boolean;
Description : When ShowSelection is false, the selected cells are not shown when the grid has no focus.
property HideFocusRect:boolean;
Description : When false, disables the painting of a focusrectangle for the current focused cell.
property MouseActions:TMouseActions;
Description : Controls several mouse handling possibilities.
property AllSelect:boolean; : allows mouse to select all cells when clicking top left fixed cell.
property RowSelect:boolean; : allows mouse to select row when clicking left fixed cell.
property ColSelect:boolean; : allows mouse to select column when clicking top fixed cell.
property DirectEdit:boolean; : immediately show editor when clicking a cell.
property DisjunctRowSelection; : enables or disables disjunct row selection.
property AllColumnSize:boolean; : sizes all columns when the first column size changes
property CaretPositioning:boolean; : immediately puts caret at right position in the text when editing. not for Delphi 1
property FindBusy:boolean;
Description : Read-only property indicates if search has started but not all cells have been searched yet.
property PrintPageWidth:integer;
Description : Read-only property indicates the width of the grid on the current printed page. Property is valid during OnPrintPage event handler.
property PrintColStart:integer;
Description : Read-only property indicates the column index of the first printed column on the current printed page. Property is valid during OnPrintPage event handler.
property PrintColEnd:integer;
Description : Read-only property indicates the column index of the last printed column on the current printed page. Property is valid during OnPrintPage event handler.
property PrintColWidth[Acol:integer]:integer;
Description : Read-only property indicates the width of column ACol on the current printed page. Property is valid during OnPrintPage event handler.
property PrintColOffset[Acol:integer]:integer;
Description : Read-only property indicates the offset from left margin of the column ACol on the current printed page. Property is valid during OnPrintPage event handler.
property PrintNrOfPages: integer;
Description : Read-only property indicates the number of pages required for printing during the OnPrintPage event handler.
property PrintPageRect: trect;
Description : Read-only property indicates the page size of the currently printed page. Can be used in the OnPrintPage event handler to add special custom printing fitted on the page.
property ColumnHeaders:tStringList;
Description : Allows setting header text of columns at design time.
property RowHeaders:tStringList;
Description : Allows setting header text of rows at design time.
property VAlignment;
Description : Sets vertical alignment of text in cells in single line mode.
property RowSelect[Arow:integer]:boolean;
Description : If goRowSelect is true in Options, the grid supports disjunt row selection through the RowSelect property. Multiple disjunct rows can be selected in the grid, either programmatically, or through clicking with ctrl key. RowSelect returns true for all current selected rows. After setting selected rows programmatically, call a repaint !
property RowSelectCount:integer;
Description : returns the number of selected rows in disjunct row select mode.
property SpinEdit:TGridSpin;
Description : Exposes the spineditor control for programmatic access to MinValue, MaxValue and Increment properties.
property BtnEdit:TGridEditBtn;
Description : Exposes the inplace editor with attached button control for programmatic access to ButtonCaption and Glyph. In this way, ButtonCaption as well as Glyph can be different for editing different cells. Make sure to set ButtonCaption to a null string ('') when using a Glyph for proper glyph alignment.
property RichEdit:TRichEdit;
Description : Exposes the internat rich edit control. Can be used to do the rich text formatting of cell with its SelAttributes/SelStart/Sellength interface.
property ScrollType:TScrollType; not for Delphi 1
Description : Determines the type of scrollbars used. Can be either ssNormal, ssFlat or ssEncarta. This property has effect only when ScrollProportional is true.
property ScrollWidth:integer; not for Delphi 1
Description : Determines the width of the scrollbars. This property has effect only when ScrollProportional is true.
property ScrollColor:TColor; not for Delphi 1
Description : Determines the background color of the scrollbars. This property has effect only when ScrollProportional is true. The default color is clNone.
property ScrollProportional:boolean; not for Delphi 1
Description : enable proportional scrollbars.
property ScrollHint:boolean;
Description : when true, a hint is shown during scroll tracking to indicate position.
property ExcelClipboardFormat:boolean; not for Delphi 1
Description : Make clipboard functions for multiline text fully compatible with Excel.
property PrinterDriverFix:boolean; not for Delphi 1
Description : When true, uses a fix required for some printer drivers for printing rotated fonts.
property OleDropRTF:boolean; not for Delphi 1,2
Description : When true, enables full rich text drag and drop
property OleDropSource:boolean; not for Delphi 1,2
Description : When true, the grid allows that a range of cells is dragged into another application that supports OLE drag & drop (like Excel / Word) The range of cells needs to be selected first in the grid and then dragged by clicking near the border of the selected cells (just like in Excel).
property OleDropTarget:boolean; not for Delphi 1,2
Description : When true, the grid accepts data being dropped on the grid (from Excel, Word) or a CSV file from Explorer. Select a range of cells in Excel or another OLE drag & drop source, and drag into the grid. The data is inserted from the position where the drop is performed. If a filename from Explorer is dropped into the grid, the grid will attempt to open the file if it's a CSV file.
property PreviewPage:boolean;
Description : Sets the page number to generate for page preview. Its default value is 1. This is a public property.
property Background:TBackground;
Description : Sets the grid background. This bitmap can be tiled across all cells as background bitmap or positioned. The subproperties are :
Bitmap : TBitmap : containing the background bitmap
Display : display mode can be tiled (bdTile) or on a fixed position (bdFixed)
Left : integer : coordinate from left when fixed position is used.
Top : integer : coordinate from top when fixed position is used.
property SortUpGlyph:TBitmap;
Description : Glyph used to indicate ascending sort mode instead of the default triangle.
property SortDownGlyph:TBitmap;
Description : Glyph used to indicate descending sort mode instead of the default triangle.
property OEMConvert:boolean;
Description : When true, the LoadFromCSV, SaveToCSV functions use OEM character conversion routines to load/save to ASCII CSV file.
property CellImages[col,row:integer]:TIntList;
Description : This public property is the integer list of indexes for a multi image cell. Indexes can be added removed, cleared through the Add, Delete, Clear methods. To add an image to the cell, use CellImages[col,row].Add(index:integer)
property GroupColumn:integer;
Description : Sets the current grouping column. To ungroup, set GroupColumn to -1. Note that column 0 is the placeholder for the grouping expand / contract nodes. The appearance of the expand / contract nodes is controlled through the CellNode property. Also note that EnableGraphics must be through in order to display the nodes.
property CellNode:TCellNode;
Description : Controls the appearance of the expand / contract nodes. It has the following subproperties :
Color : background color of the node when display mode is cnFlat
ContractGlyph : glyph to display when node is in contracted state when NodeType is cnGlyph
ExpandGlyph : glyph to display when node is in expanded state when NodeType is cnGlyph
NodeColor : node color when mode is cnFlat
NodeType : controls 3 node display modes : cnFlat, cn3D, cnGlyph
property ArrowColor:TColor;
Description : public property controlling the color of the arrows in enhanced row / column move mode.
property JavaCSV:boolean;
Description : public property. When true, the CSV file is in Java compatible mode, ie. line breaks are saved as ~ characters.
property HTMLSettings:THTMLSettings;
Description : property controlling several options for the SaveToHTML function.
BorderSize : table border size in HTML
CellSpacing : table cellspacing in HTML
FooterFile : file that is optionally appended at the end of the HTML for the grid content.
HeaderFile : file that is optionally included before the grid content
PrefixTag : optional HTML tags included before the grid content HTML code
SuffixTag : optional HTML tags included after the grid content HTML code
SaveColor : when true, color information is saved in HTML
SaveFonts : when true, font information is saved in HTML
TableStyle : optional table style tags for HTML
Width : width in % of the HTML table
property Hovering:boolean;
Description : When true, the cell under the mouse cursor is automatically selected when the mouse is over it for some time.
property OriginalCellValue:string;
Description : Cell value before editing starts. Can be used in validation to restore the original value.
property FilterActive:boolean;
Description : Set true to start filtering based on the filter specified with the Filter property.
property Filter:TFilter;
Description : Holds the filter specifier for a filtering operation. Filter is a TCollection of elements with 2 properties, Condition, which is a string and Column which is an integer. The Condition property can contain a condition in following formats :
substring filterting :
S*, S? : * or ? denote multi or single character matches
>, < , >=, =< : larger than, less than, larger or equal, less or equal (when data is numeric, comparison take place based on numeric data, otherwise on alphabetic comparisons)
= , ! : equal or not equal
& , ^ : logical AND , logical OR
Thus, an expression : >20 & <30 is a valid filtering expression as well as !A*
Events

property OnGetCellColor: TGridColorEvent;
Description : event handler called to set the color of a cell. If no handler is specified or your handler simply return, default color settings are used.

TGridColorEvent = procedure (Sender: TObject; ARow, ACol: Longint; AState: TGridDrawState; ABrush: TBrush; AFont: TFont ) of object;
ARow and Acol indicate cell for which color must be set. ABrush specifies the cell background brush. AFont can be used to modify font for a given cell.
property OnGetCellPrintColor: TGridColorEvent;
Description : identical as OnGetCellColor, but for printing. Can be same event handler as OnGetCellColor or a separate event handler if needed.
property OnGetAlignment: TGridAlignEvent;
Description : event handler called to set alignment of a cell. If no handler is specified or your handler simply returns, left alignment is used.
TGridAlignEvent = procedure (Sender: TObject; ARow, ACol: Longint; var AAlignment: TAlignment) of object;
TAlignment can be taLeftJustify, taRightJustify or taCenter.
property OnGetFormat: TGridFormatEvent;
Description : event handler called to set datatype of cells in a column. This is called during sorts to determine method for sorting. Sorting can be alphabetic, numeric, using dates or using a custom sorting format. If custom sorting is selected, an event is called to compare cells during sorts.
TGridFormatEvent = procedure (Sender : TObject; ACol:longint;var AStyle:TSortStyle;var aPrefix,aSuffix:string) of object;
TSortStyle can be ssAutomatic, ssAlphabetic, ssNumeric, ssDate, ssAlphaCase, ssAlphaNoCase, ssShortDateEU, ssShortDateUS, ssCustom, ssRaw, ssHTML, ssImages.
Use aSuffix or aPrefix when this text must not be considered for the sort.
Remarks for sort styles :
ssCustom : the OnCustomCompare event is called for every compare. This compare works on strings only.
ssRaw : the OnRawCompare event is called, giving both string and cell location as parameters for the compare.
ssImages : the image indexes of the cells are used for the compare functions.
property OnCustomCompare: TCustomCompareEvent;
Description : event handler called to compare two cells with a custom function. The result of the OnCustomCompare event should be set in the res parameter and according to :

+1 : str1 > str2
=0 : str1 = str2
-1 : str1 < str2
TCustomCompareEvent = procedure(Sender:TObject; str1,str2:string;var res:integer) of object;
property OnRawCompare: TRawCompareEvent;
Description : event handler called to compare two cells with custom function. Passes just the indexes of the cell to allow compares based on other data than just the cell text as with the OnCustomCompare event. The result of the OnRawCompare event should be set in the res parameter and according to :

>0 : cell 1 > cell 2
=0 : cell 1 = cell 2
<0 : cell 1 < cell 2
TRawCompareEvent = procedure(Sender:TObject; col,row1,row2:longint;var res:integer) of object;
property OnGridHint:TGridHintEvent;
Description : event handler can be used to set different hints for each cell. Set the hintstring parameter for a given column and row to specify a special hint for a given cell. Default StringGrid hint is used when no handler is defined or handler simply return.
TGridHintEvent = procedure (Sender:TObject; Arow, Acol:longint; var hintstr:string) of object;
property OnAutoInsertRow:TAutoInsertRowEvent;
Description : event handler called after user has inserted a row by pressing INS button. Can be used to initialize a row to default data.
TAutoInsertRowEvent = procedure(Sender:TObject; ARow:longint) of object;
property OnAutoDeleteRow:TAutoDeleteRowEvent;
Description : event handler called after user has deleted a row by pressing DEL button.
TAutoDeleteRowEvent = procedure(Sender:TObject; aRow:longint) of object;
property OnClickSort:TClickSortEvent;
Description : event handler called when user clicked on the fixed column header to sort on a specific column.
TClickSortEvent = procedure(Sender:TObject; aCol:longint) of object;
property OnCanSort:TCanSortEvent;
Description : event handler called when user clicked on a column header to sort a column. The event handler is called before starting the sort to query if the column can be sorted. If no handler is specified or handler simply returns, sorting is performed, otherwise, set dosort to false to disable sorting a specific column.
TCanSortEvent = procedure(Sender:TObject; aCol:longint; var dosort:boolean) of object;
property OnPrintStart:TGridPrintStartEvent;
Description : event handler called after calculation of number of pages and before printing is actually started. This event allows to specify range of pages to be printed.
TGridPrintStartEvent = procedure (Sender:TObject; NrOfPages:integer;var FromPage,ToPage:integer) of object;

NrOfPages indicates the required number of pages. FromPage,ToPage are initialized to 1, NrOfPages respectively. Changing the parameters FromPage, ToPage changes range of printed pages. The PrintDialog can be used to set these variables.
property OnPrintPage:TGridPrintPageEvent;
Description : event handler called when a page is printed (either on hardcopy or during printpreview). This event handler creates the possibility to add custom drawing to the printing process. The Canvas is passed as a parameter and can be used to draw. Notice that changing canvas settings such as pen, font, brush affect printing other data. If a setting like a font must be changed for the custom printing process, the original settings must be restored. This can be done in following way for a font for example :

savefont:=tfont.create;
savefont.assign(font);
//do custom drawing here and change font
font.assign(savefont);
savefont.free;

Printing is done in a canvas set to MM_LOMETRIC. This means that all units are in 1/10mm and page coordinates go from 0,0 to xsize,-ysize. There are no restrictions to the position where custom drawing is done.

property OnPrintNewPage:TGridPrintNewPageEvent;
Description : event handler called after printing each row to query to start a new page. The parameter is the current row being printed, and NewPage is a boolean that can be set true to start printing on a new page.
property OnPrintSetColumnWidth::TGridPrintColumnWidthEvent;
Description : event handler called to overrule the automatically calculated column widths. Use this event handler if you need to exactly define column widths for printing. All dimensions are in 1/10mm.
property OnPrintSetRowHeight::TGridPrintRowHeightEvent;
Description : event handler called to overrule the automatically calculated row heights. Use this event handler if you need to exactly define row heights for printing. All dimensions are in 1/10mm.
property OnClickCell :TClickCellEvent;
Description : event handler called when left mouse is pressed on a cell which returns column and row of the selected cell.
TClickCellEvent = procedure (Sender:TObject;Arow,Acol:longint) of object;
property OnRightClickCell :TClickCellEvent;
Description : event handler called when right mouse is pressed on a cell which returns column and row of the selected cell.
TClickCellEvent = procedure (Sender:TObject;Arow,Acol:longint) of object;
property OnDblClickCell :TDblClickCellEvent;
Description : event handler called when left mouse is dubbleclicked on a cell which returns column and row of the selected cell.
TDblClickCellEvent = procedure (Sender:TObject;Arow,Acol:longint) of object;

property OnCanEditCell :TCanEditCellEvent;
Description : event handler to set a cell to read-only.
TCanEditCellEvent = procedure (Sender:TObject;Arow,Acol:longint;var canedit:boolean) of object;
Set canedit to false if the cell Arow,Acol must be readonly.

property OnCellValidate :TCellValidateEvent;
Description : event handler to add posibility to do input validation. The event handler is called after the user leaves a cell after editing. Set the Valid parameter to false is input is not accepted and cell should contain old value.
TCellValidateEvent = procedure(Sender: TObject; Col, Row: Longint; var Value: String; var Valid: Boolean) of object;
property OnGetEditorType :TGetEditorTypeEvent; not for Delphi 1
Description : event handler to query the type of inplace editor for the cell.
TGetEditorTypeEvent = procedure(Sender:TObject;aCol,aRow:integer; var aEditor:TEditorType) of object;
For cell Acol, Arow set aEditor either to :

TEditorType = (edNormal,edSpinEdit,edComboEdit,edComboList,edEditBtn,edDateEdit,edTimeEdit, edButton,
edNumeric,edFloat,edCapital,edMixedCase,edLowerCase,edUpperCase, edDateEditUpDown, edUnitEditBtn, edPasswor);
Notice that
1) DateEdit is not only available in Delphi 1.
2) Checkboxes are set/removed with the AddCheckbox, RemoveCheckbox procedures.
3) Combobox contents are set with AddComboboxString procedure.

property OnFitToPage:TDoFitToPageEvent;
Description : event handler to query for allowing fit to page with calculated scalefactor.
TDoFitToPageEvent = procedure(Sender:TObject;var scalefactor:double;var allow:boolean);
Set allow to false to disable fit to page, or change the scalefactor programmatically..

property OnComboChange:TComboChangeEvent;
Description : event handler called whenever the selection of the current combobox inplace editor is being changed.
property OnSpinClick:TSpinClickEvent;
Description : event handler called when the value of the current spineditor inplace editor is being changed.

TSpinClickEvent = procedure(Sender:TObject;aCol,aRow,aValue:integer;updown:boolean) of object;
property OnCheckBoxClick:TCheckBoxClickEvent;
Description : event handler called after the current checkbox inplace editor is clicked.
TCheckBoxClickEvent = procedure(Sender:TObject;aCol,aRow:integer;state:boolean) of object;
property OnRadioClick:TRadioClickEvent;
Description : event handler called when clicking a radiobutton in a radiobutton group inplace editor.
TRadioClickEvent = procedure(Sender:TObject;aCol,aRow,aIdx:integer) of object;
property OnColumnSize:TOnColumnSizeEvent; only for Delphi 4
Description : event handler used to control whether a column can be resized or not. This allows to control programmatically which columns can be resized and which not rather than a global control with goColumnSizing.
goColumnSizing must be set true after which OnColumnSize is called on start of every column resizing with mouse.
TColumnSizeEvent = procedure (Sender:TObject; aCol:integer; var allow:boolean) of object;
Allow is default true. To disable sizing of column aCol, set Allow to false.
property OnEndColumnSize:TEndColumnSizeEvent;
Description : event handler is called when user stops column sizing
property OnScrollHint:TScrollHintEvent;
Description : event handler is called when user is scroll-tracking to modify the scrollhint text. Default text is Row=arow.
property OnGetCellBorder:TGridBordertEvent;
Description : event handler is called to set border style for each cell.
TGridBorderEvent = procedure (Sender: TObject; ARow, ACol: Longint; APen:TPen;var borders:TCellBorders) of object;
TCellBorder = (cbTop,cbLeft,cbRight,cbBottom);
TCellBorders = set of TCellBorder
Can be used to specify what cell borders must be displayed in the grid.
property OnGetCellPrintBorder:TGridBordertEvent;
Description : same as OnGetCellBorder but for printing.
property OnIsFixedCell:TIsFixedCellEvent;
Description : event handler is called to determine if a cell wherever in the grid is fixed style. Set the IsFixed parameter to true for all fixed cells.
TIsFixedCellEvent = procedure (Sender:TObject;Arow,Acol:longint;var isfixed:boolean) of object;
property OnIsPasswordCell:TIsPasswordCellEvent;
Description : event handler is called to determine if a cell wherever in the grid is password style. Set the IsPassword parameter to true for all password cells. To allow editing as password, use the edPassword style in the OnGetEditorType event.
TIsPasswordCellEvent = procedure (Sender:TObject;Arow,Acol:longint;var ispassword:boolean) of object;
property OnAnchorClick:TAnchorClickEvent;
Description : event handler is called when an anchor within a HTML formatted cells is clicked. The anchor parameter is the value of the HREF tag. Set AutoHandle to true if the grid can perform a ShellExecute on the anchor, or set to false and handle the anchorclick from the application.
TAnchorClickEvent = procedure(Sender:TObject;Arow,Acol:integer; anchor:string; var AutoHandle:boolean) of object;
property OnAnchorEnter:TAnchorEvent;
Description : Event called when the mouse enters an anchor inside a cell with HTML formatted text.
TAnchorEvent = procedure(Sender:TObject;Arow,Acol:integer; anchor:string) of object;
property OnAnchorExit:TAnchorEvent;
Description : Event called when the mouse leaves an anchor inside a cell with HTML formatted text.
TAnchorEvent = procedure(Sender:TObject;Arow,Acol:integer; anchor:string) of object;
property OnRowChanging:TRowChangingEvent;
Description : event handler is called when the selected row is about to change from the OldRow to the NewRow. With the Allow parameter, this change can be programmatically disabled or not.
TRowChangingEvent = procedure(Sender:TObject; OldRow, NewRow: longint; var Allow:boolean) of object;
property OnColChanging:TColChangingEvent;
Description : event handler is called when the selected col is about to change from the OldCol to the NewCol. With the Allow parameter, this change can be programmatically disabled or not.
TColChangingEvent = procedure(Sender:TObject; OldCol, NewCol: longint; var Allow:boolean) of object;
property OnCellChanging:TCellChangingEvent;
Description : event handler is called when the selected col is about to change from the OldRow,OldCol to the NewRow,NewCol. With the Allow parameter, this change can be programmatically disabled or not.
TCellChangingEvent = procedure(Sender:TObject; OldRow, NewRow, OldCol, NewCol: longint; var Allow:boolean) of object;
property OnClipboardPaste:TClipboardEvent;
Description : event handler is called user performs a clipboard paste and parameter Allow can be used to disable the paste.
property OnClipboardCopy:TClipboardEvent;
Description : event handler is called user performs a clipboard copy and parameter Allow can be used to disable the paste.
property OnClipboardCut:TClipboardEvent;
Description : event handler is called user performs a clipboard cut and parameter Allow can be used to disable the paste.
property OnFileProgress:TGridProgressEvent;
Description : Event called during LoadFromFile, LoadFromCSV, SaveToFile, SaveToCSV methods to indicate the progress of the operation. The progress parameter is a value between 0 and 100.