Class GridModel
A class that holds all the data related information of the Grid
Inheritance
System.Object
GridModel
Implements
System.IDisposable
Assembly: Syncfusion.SfCellGrid.WPF.dll
Syntax
public class GridModel : Object, IDisposable, IGridVolatileCellStylesHost
Constructors
GridModel(SfCellGrid)
Declaration
public GridModel(SfCellGrid grid)
Parameters
Properties
BaseStylesMap
Declaration
public GridBaseStylesMap BaseStylesMap { get; set; }
Property Value
ColStyles
Declaration
public GridStyleInfoIndexer ColStyles { get; }
Property Value
CopyPasteOptions
Declaration
public CopyPasteOptions CopyPasteOptions { get; set; }
Property Value
Declaration
public GridStyleInfo FooterStyle { get; }
Property Value
Declaration
public FormulaEngine FormulaEngine { get; }
Property Value
Grid
Declaration
public SfCellGrid Grid { get; }
Property Value
HasBaseStylesMap
Declaration
public bool HasBaseStylesMap { get; }
Property Value
Declaration
public GridStyleInfo HeaderStyle { get; }
Property Value
Item[Int32, Int32]
Declaration
public GridStyleInfo this[int rowIndex, int colIndex] { get; set; }
Parameters
Type |
Name |
Description |
System.Int32 |
rowIndex |
|
System.Int32 |
colIndex |
|
Property Value
RowColStylePrecedence
Declaration
public PrecedenceStyle RowColStylePrecedence { get; set; }
Property Value
RowStyles
Declaration
public GridStyleInfoIndexer RowStyles { get; }
Property Value
TableStyle
Declaration
public GridStyleInfo TableStyle { get; }
Property Value
Methods
add_ClipboardCopy(GridCutPasteEventHandler)
Declaration
public void add_ClipboardCopy(GridCutPasteEventHandler value)
Parameters
add_ClipboardCut(GridCutPasteEventHandler)
Declaration
public void add_ClipboardCut(GridCutPasteEventHandler value)
Parameters
add_ClipboardPaste(GridCutPasteEventHandler)
Declaration
public void add_ClipboardPaste(GridCutPasteEventHandler value)
Parameters
add_ColumnsInserted(GridRangeInsertedEventHandler)
Declaration
public void add_ColumnsInserted(GridRangeInsertedEventHandler value)
Parameters
add_ColumnsRemoved(GridRangeRemovedEventHandler)
Declaration
public void add_ColumnsRemoved(GridRangeRemovedEventHandler value)
Parameters
add_CommitCellInfo(GridCommitCellInfoEventHandler)
Declaration
public void add_CommitCellInfo(GridCommitCellInfoEventHandler value)
Parameters
add_QueryBaseStyles(GridQueryBaseStylesEventHandler)
Declaration
public void add_QueryBaseStyles(GridQueryBaseStylesEventHandler value)
Parameters
add_QueryCellInfo(GridQueryCellInfoEventHandler)
Declaration
public void add_QueryCellInfo(GridQueryCellInfoEventHandler value)
Parameters
add_QueryCoveredRange(GridQueryCoveredRangeEventHandler)
Declaration
public void add_QueryCoveredRange(GridQueryCoveredRangeEventHandler value)
Parameters
add_RowsInserted(GridRangeInsertedEventHandler)
Declaration
public void add_RowsInserted(GridRangeInsertedEventHandler value)
Parameters
add_RowsRemoved(GridRangeRemovedEventHandler)
Declaration
public void add_RowsRemoved(GridRangeRemovedEventHandler value)
Parameters
Declaration
public void ClearStyle(RowColumnIndex cell)
Parameters
ClearStyles()
Declaration
public void ClearStyles()
Dispose()
Call the Dispose and SuppressFinalize method for dipose the instance of GridModel class.
Declaration
Dispose(Boolean)
Dispose the live resources used by the GridModel class.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
Dispose the instance, if it is True
|
InsertColumns(Int32, Int32)
Inserts the given number of columns at the specified column index.
Declaration
public virtual void InsertColumns(int insertAtColumnIndex, int count)
Parameters
Type |
Name |
Description |
System.Int32 |
insertAtColumnIndex |
The column index to insert.
|
System.Int32 |
count |
Number of columns to be inserted.
|
InsertColumnsCore(Int32, Int32, GridMoveCellsState)
Declaration
protected virtual void InsertColumnsCore(int insertAtColumnIndex, int count, GridMoveCellsState moveCellsState)
Parameters
Type |
Name |
Description |
System.Int32 |
insertAtColumnIndex |
|
System.Int32 |
count |
|
GridMoveCellsState |
moveCellsState |
|
InsertRows(Int32, Int32)
Inserts specified number of rows at the given row index.
Declaration
public virtual void InsertRows(int insertAtRowIndex, int count)
Parameters
Type |
Name |
Description |
System.Int32 |
insertAtRowIndex |
The row index to insert.
|
System.Int32 |
count |
Number of rows to be inserted
|
InsertRowsCore(Int32, Int32, GridMoveCellsState)
Declaration
protected virtual void InsertRowsCore(int insertAtRowIndex, int count, GridMoveCellsState moveCellsState)
Parameters
Type |
Name |
Description |
System.Int32 |
insertAtRowIndex |
|
System.Int32 |
count |
|
GridMoveCellsState |
moveCellsState |
|
LookupCellRenderer(String)
Declaration
public IGridCellRenderer LookupCellRenderer(string id)
Parameters
Type |
Name |
Description |
System.String |
id |
|
Returns
OnClipboardCopy(GridCutPasteEventArgs)
Declaration
protected virtual void OnClipboardCopy(GridCutPasteEventArgs e)
Parameters
OnClipboardCut(GridCutPasteEventArgs)
Declaration
protected virtual void OnClipboardCut(GridCutPasteEventArgs e)
Parameters
OnClipboardPaste(GridCutPasteEventArgs)
Declaration
protected virtual void OnClipboardPaste(GridCutPasteEventArgs e)
Parameters
OnColumnsInserted(GridRangeInsertedEventArgs)
Declaration
protected virtual void OnColumnsInserted(GridRangeInsertedEventArgs e)
Parameters
OnColumnsRemoved(GridRangeRemovedEventArgs)
Declaration
protected virtual void OnColumnsRemoved(GridRangeRemovedEventArgs e)
Parameters
OnCommitCellInfo(GridCommitCellInfoEventArgs)
Declaration
protected virtual void OnCommitCellInfo(GridCommitCellInfoEventArgs e)
Parameters
OnCreateBaseStylesMap()
Declaration
protected virtual GridBaseStylesMap OnCreateBaseStylesMap()
Returns
OnCreateVolatileCellStyles()
Declaration
protected virtual GridVolatileCellStyles OnCreateVolatileCellStyles()
Returns
OnQueryCellInfo(GridQueryCellInfoEventArgs)
Declaration
protected virtual void OnQueryCellInfo(GridQueryCellInfoEventArgs e)
Parameters
OnRowsInserted(GridRangeInsertedEventArgs)
Declaration
protected virtual void OnRowsInserted(GridRangeInsertedEventArgs e)
Parameters
OnRowsRemoved(GridRangeRemovedEventArgs)
Declaration
protected virtual void OnRowsRemoved(GridRangeRemovedEventArgs e)
Parameters
remove_ClipboardCopy(GridCutPasteEventHandler)
Declaration
public void remove_ClipboardCopy(GridCutPasteEventHandler value)
Parameters
remove_ClipboardCut(GridCutPasteEventHandler)
Declaration
public void remove_ClipboardCut(GridCutPasteEventHandler value)
Parameters
remove_ClipboardPaste(GridCutPasteEventHandler)
Declaration
public void remove_ClipboardPaste(GridCutPasteEventHandler value)
Parameters
remove_ColumnsInserted(GridRangeInsertedEventHandler)
Declaration
public void remove_ColumnsInserted(GridRangeInsertedEventHandler value)
Parameters
remove_ColumnsRemoved(GridRangeRemovedEventHandler)
Declaration
public void remove_ColumnsRemoved(GridRangeRemovedEventHandler value)
Parameters
remove_CommitCellInfo(GridCommitCellInfoEventHandler)
Declaration
public void remove_CommitCellInfo(GridCommitCellInfoEventHandler value)
Parameters
remove_QueryBaseStyles(GridQueryBaseStylesEventHandler)
Declaration
public void remove_QueryBaseStyles(GridQueryBaseStylesEventHandler value)
Parameters
remove_QueryCellInfo(GridQueryCellInfoEventHandler)
Declaration
public void remove_QueryCellInfo(GridQueryCellInfoEventHandler value)
Parameters
remove_QueryCoveredRange(GridQueryCoveredRangeEventHandler)
Declaration
public void remove_QueryCoveredRange(GridQueryCoveredRangeEventHandler value)
Parameters
remove_RowsInserted(GridRangeInsertedEventHandler)
Declaration
public void remove_RowsInserted(GridRangeInsertedEventHandler value)
Parameters
remove_RowsRemoved(GridRangeRemovedEventHandler)
Declaration
public void remove_RowsRemoved(GridRangeRemovedEventHandler value)
Parameters
RemoveColumns(Int32, Int32)
Removes given number of columns from the specified index.
Declaration
public virtual void RemoveColumns(int removeAtColumnIndex, int count)
Parameters
Type |
Name |
Description |
System.Int32 |
removeAtColumnIndex |
The column index.
|
System.Int32 |
count |
Number of columns to be removed.
|
RemoveColumnsCore(Int32, Int32, GridMoveCellsState)
Declaration
protected virtual void RemoveColumnsCore(int removeAtColumnIndex, int count, GridMoveCellsState moveCellsState)
Parameters
Type |
Name |
Description |
System.Int32 |
removeAtColumnIndex |
|
System.Int32 |
count |
|
GridMoveCellsState |
moveCellsState |
|
RemoveRows(Int32, Int32)
Deletes given number of rows from the specified index.
Declaration
public virtual void RemoveRows(int removeAtRowIndex, int count)
Parameters
Type |
Name |
Description |
System.Int32 |
removeAtRowIndex |
The row index.
|
System.Int32 |
count |
Number of rows to be removed.
|
RemoveRowsCore(Int32, Int32, GridMoveCellsState)
Declaration
protected virtual void RemoveRowsCore(int removeAtRowIndex, int count, GridMoveCellsState moveCellsState)
Parameters
Type |
Name |
Description |
System.Int32 |
removeAtRowIndex |
|
System.Int32 |
count |
|
GridMoveCellsState |
moveCellsState |
|
ResizeColumnsToFit(GridRangeInfo, GridResizeToFitOptions)
Set the columnwidth of given range based on the content width.
Declaration
public bool ResizeColumnsToFit(GridRangeInfo range, GridResizeToFitOptions options)
Parameters
Type |
Name |
Description |
GridRangeInfo |
range |
specify the range to apply for resizing
|
GridResizeToFitOptions |
options |
specify the resizing options such as includeheaders,noshrinksize by default set as none
|
Returns
ResizeRowsToFit(GridRangeInfo, GridResizeToFitOptions)
Set the rowheight of given range based on the content height.
Declaration
public bool ResizeRowsToFit(GridRangeInfo range, GridResizeToFitOptions options)
Parameters
Returns
Events
ClipboardCopy
Declaration
public event GridCutPasteEventHandler ClipboardCopy
Event Type
ClipboardCut
Declaration
public event GridCutPasteEventHandler ClipboardCut
Event Type
ClipboardPaste
Declaration
public event GridCutPasteEventHandler ClipboardPaste
Event Type
ColumnsInserted
Declaration
public event GridRangeInsertedEventHandler ColumnsInserted
Event Type
ColumnsRemoved
Declaration
public event GridRangeRemovedEventHandler ColumnsRemoved
Event Type
CommitCellInfo
Declaration
public event GridCommitCellInfoEventHandler CommitCellInfo
Event Type
QueryBaseStyles
Declaration
public event GridQueryBaseStylesEventHandler QueryBaseStyles
Event Type
QueryCellInfo
Declaration
public event GridQueryCellInfoEventHandler QueryCellInfo
Event Type
QueryCoveredRange
Declaration
public event GridQueryCoveredRangeEventHandler QueryCoveredRange
Event Type
RowsInserted
Declaration
public event GridRangeInsertedEventHandler RowsInserted
Event Type
RowsRemoved
Declaration
public event GridRangeRemovedEventHandler RowsRemoved
Event Type
Explicit Interface Implementations
IGridVolatileCellStylesHost.BaseStylesMap
Declaration
GridBaseStylesMap IGridVolatileCellStylesHost.BaseStylesMap { get; }
Returns
Declaration
void IGridVolatileCellStylesHost.CommitCellInfo(RowColumnIndex cell, GridStyleInfo style, StyleInfoProperty sip)
Parameters
Declaration
IStyleInfo[] IGridVolatileCellStylesHost.QueryBaseStyles(RowColumnIndex cell, GridStyleInfo style)
Parameters
Returns
Declaration
void IGridVolatileCellStylesHost.QueryCellInfo(RowColumnIndex cell, GridStyleInfo style)
Parameters
Implements
System.IDisposable