QueryCellModel Event (GridModel)

Occurs when the QueryCellModel is querying for the GridCellModelBase and the cell type is not found in the GridCellModelCollection.
<DescriptionAttribute("Occurs is querying for a cell type.")>
Public Event QueryCellModel As GridQueryCellModelEventHandler
Dim instance As GridModel
Dim handler As GridQueryCellModelEventHandler
AddHandler instance.QueryCellModel, handler
[Description("Occurs is querying for a cell type.")]
public event GridQueryCellModelEventHandler QueryCellModel
Event Data

The event handler receives an argument of type GridQueryCellModelEventArgs containing data related to this event. The following GridQueryCellModelEventArgs properties provide information specific to this event.

Gets or sets the GridCellModelBase for the cell type. You should create a new instance of the specific cell model and save it to this property.  
Gets the cell type identifier as used in the GridStyleInfo.CellType property.  
Gets GridModel. (Inherited from Syncfusion.Windows.Forms.Grid.GridModelEventArgs)
The GridModel has a table with all cell types used in the grid. Whenever the grid encounters a new cell type that it cannot find in the table it will raise a QueryCellModel event. The GridStyleInfo.CellType identifies the name of the cell type. The GridQueryCellModelEventArgs.CellModel should receive the new instance of the associated cell object. This object will be stored in the table together with its name and reused among cells with the same GridStyleInfo.CellType.

You should process this event if you want to add custom cell types and initialize these cell types on demand when associated cells are accessed the first time.


Syncfusion.Grid.Windows: 17.3460.0.26

See Also