Class GridSaveCellInfoEventArgs
Provides data about the SaveCellInfo event which can be marked as handled.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public sealed class GridSaveCellInfoEventArgs : GridCellHandledEventArgs
Remarks
GridSaveCellInfoEventArgs is a custom event argument class used by the SaveCellInfo event to save style information about at a specified cell.
This event allows you to customize cell contents at run-time on demand, just before the cell is drawn or programmatically accessed through Item[Int32, Int32], ColStyles, RowStyles, or TableStyle.
If you made changes to Style you should also set Handled to True. The grid will check this flag to see whether the style has been changed from its original settings.
The GridSaveCellInfoEventArgs members, e.ColIndex and e.RowIndex, specify column and row of the cell. The e.Style member holds the GridStyleInfo object whose properties this event should change provided it is a cell that you want to save changes for. It is possible that e.ColIndex and / or e.RowIndex may have the value of -1. A -1 indicates that a row style or column style is being saved. So, e.ColIndex = -1 and and e.RowIndex = 4 indicates the rowstyle for row 4 is being saved (GridControl.RowStyles[4]). Similarly, a positive column value with the row value = -1 would be a request for that particular columnstyle. If both values are -1, the TableStyle property is being saved.
Header rows and columns in an Essential Grid are treated the same as other rows and columns with respect to QueryCellInfo. If you have a single header row, anytime e.ColIndex is 0, a row header is being requested. Similarly, if you have a single column header row, e.RowIndex = 0 is a request for the column header.
See DataBoundGrid source code for example.
note
The intention of this event is to store and retrieve data. See GridCellsChangedEventArgs for the related UI event after changes were made to the data store.
Constructors
GridSaveCellInfoEventArgs(Int32, Int32, GridStyleInfo, StyleModifyType)
Initializes the new instances of the GridSaveCellInfoEventArgs class.
Declaration
public GridSaveCellInfoEventArgs(int rowIndex, int colIndex, GridStyleInfo style, StyleModifyType modifyType)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | The row index. |
System.Int32 | colIndex | The column index. |
GridStyleInfo | style | The style information for the cell. |
StyleModifyType | modifyType | The style operation to be applied to the cells existing style. |
Properties
ModifyType
Gets the style operation to be applied to the cell's existing style.
Declaration
[TraceProperty(true)]
public StyleModifyType ModifyType { get; }
Property Value
Type |
---|
StyleModifyType |
Style
Gets the style information for the cell.
Declaration
[TraceProperty(true)]
public GridStyleInfo Style { get; }
Property Value
Type |
---|
GridStyleInfo |