Public Member Functions | |
override string | GetColumnLabel (int columnIndex) |
override string | GetRowLabel (int rowIndex) |
override object | GetValue (Point cellCoord) |
override bool | SetColumnLabel (int columnIndex, string newLabel) |
override bool | SetRowLabel (int rowIndex, string newLabel) |
override bool | SetValue (Point cellCoord, object value) |
SparseGridModel (DefaultValueGenerator defaultValueGenerator, int initialNoOfColumns, int initialNoOfRows) | |
SparseGridModel (int initialNoOfColumns, int initialNoOfRows) | |
Properties | |
DefaultValueGenerator | DefaultValueGenerator [get, set] |
You may set labels. The default column labels will be the strings 'A' to 'Z' if the number of columns is smaller than 27, 'AA' to 'ZZ' if less than 677 columns are defined, 'AAA' to 'ZZZ' if 15677, and so on. The default row labels will be the running row index starting with 1.
The number of rows and column can be changed dynamically.
wx.GridCtrl.Extended.SparseGridModel.SparseGridModel | ( | int | initialNoOfColumns, | |
int | initialNoOfRows | |||
) |
Creates an instance.
initialNoOfColumns | Initial number of columns. | |
initialNoOfRows | Initial number of rows. |
wx.GridCtrl.Extended.SparseGridModel.SparseGridModel | ( | DefaultValueGenerator | defaultValueGenerator, | |
int | initialNoOfColumns, | |||
int | initialNoOfRows | |||
) |
Creates an instance.
defaultValueGenerator | Delegate to create default values that will be returned for those cells that do not contain a stored value (set by SetValue()). | |
initialNoOfColumns | Initial number of columns. | |
initialNoOfRows | Initial number of rows. |
override string wx.GridCtrl.Extended.SparseGridModel.GetColumnLabel | ( | int | rowIndex | ) | [virtual] |
Returns an object hat is the column label. This may be null
if unknown or undefined.
columnIndex | the index of the labelled column. |
Implements wx.GridCtrl.Extended.BaseGridModel.
override string wx.GridCtrl.Extended.SparseGridModel.GetRowLabel | ( | int | rowIndex | ) | [virtual] |
Returns an object hat is the row label. This may be null
if unknown or undefined.
rowIndex | the index of the labelled row. |
Implements wx.GridCtrl.Extended.BaseGridModel.
override object wx.GridCtrl.Extended.SparseGridModel.GetValue | ( | Point | cellCoord | ) | [virtual] |
The value of a grid cell.
cellCoord | The coordinates of the grid cell. The X coordinate provides the column index, the Y coordinate is the row index. |
System.IndexOutOfRangeException | If rowIndex or columnIndex is negative or equal to or larger than the number of rows or columns repectively. |
Implements wx.GridCtrl.Extended.BaseGridModel.
override bool wx.GridCtrl.Extended.SparseGridModel.SetColumnLabel | ( | int | columnIndex, | |
string | newLabel | |||
) | [virtual] |
Sets the column label.
columnIndex | The index of the labelled column. | |
newLabel | The new label. |
Implements wx.GridCtrl.Extended.BaseGridModel.
override bool wx.GridCtrl.Extended.SparseGridModel.SetRowLabel | ( | int | rowIndex, | |
string | newLabel | |||
) | [virtual] |
Sets the row label.
rowIndex | The index of the labelled row. | |
newLabel | The new row label. |
Implements wx.GridCtrl.Extended.BaseGridModel.
override bool wx.GridCtrl.Extended.SparseGridModel.SetValue | ( | Point | cellCoord, | |
object | value | |||
) | [virtual] |
Assign a value to a cell.
cellCoord | The coordinates of the grid cell. The X coordinate provides the column index, the Y coordinate is the row index. | |
value | The value that will be assigned to the cell. |
Implements wx.GridCtrl.Extended.BaseGridModel.
DefaultValueGenerator wx.GridCtrl.Extended.SparseGridModel.DefaultValueGenerator [get, set] |
Get or set the default value generator. Please note, that changing the default value generator will NOT raise value change events.