Skip to content

CreateGridSearchDialogObject - cCJGrid

Creates and returns a search dialog object. Can be augmented to customize a search dialog

Type: Function
Return Data Type: Handle

Syntax

Function CreateGridSearchDialogObject Returns Handle

Call Example

Get CreateGridSearchDialogObject to HandleVariable

Description

CreateGridSearchDialogObject is called when a grid needs to create a search dialog, which are used most typically to prompt lists (cCJGridPromptList and cDbCJGridPromptList).

A default search dialog is created for you. CreateGridSearchDialogObject creates that dialog object. By default, it creates a :cCJGridSearchDialog object and returns its handle. The cCJGridSearchDialog is a private class and, for the most part, the construction and interface requirements of this dialog object is considered private. You may augment CreateGridSearchDialogObject to use your own custom dialog. The construction of a custom search dialog is an advanced and undocumented technique. If you replace this, you should study this class and extend or replace it carefully.

Sample

In this sample, we assume you have properly created your own custom dialog class named cMyCJGridSearchDialog, which you wish to use in place of the standard dialog.

Function CreateGridSearchDialogObject Returns Handle
    Handle hoSearchDialog
    Get Create (RefClass(cMyCJGridSearchDialog)) to hoSearchDialog
    Function_Return hoSearchDialog
End_Function