Inherits from
- HasTraits: enthought.traits.has_traits.HasTraits
Attributes
- columns
The columns in the model.
columns = List(GridColumn)
- data
fixme : factor this default model into "SimpleGridModel" or similar An optional 2-dimensional list/array containing the grid data.
data = Any
- model_changed
Fired when the data in the model has changed.
model_changed = Event
- rows
The rows in the model.
rows = List(GridRow)
- show_column_headers
Show column headers?
show_column_headers = Bool(True)
- show_row_headers
Show row headers?
show_row_headers = Bool(True)
Method summary
- __init__(self, **traits)
- CanGetValueAs(self, row, col, type_name)
- CanSetValueAs(self, row, col, type_name)
- DeleteRows(self, pos, num_rows)
- GetColLabelValue(self, col)
- GetNumberCols(self)
- GetNumberRows(self)
- GetRowLabelValue(self, row)
- GetTypeName(self, row, col)
- GetValue(self, row, col)
- IsEmptyCell(self, row, col)
- SetValue(self, row, col, value)
Methods
- __init__(self, **traits)
Create a new grid model.
- CanGetValueAs(self, row, col, type_name)
Called to determine how the data can be fetched.
This allows you to enforce some type-safety in the grid.
- CanSetValueAs(self, row, col, type_name)
Called to determine how the data can be stored.
This allows you to enforce some type-safety in the grid.
- DeleteRows(self, pos, num_rows)
Called when the view is deleting rows.
- GetColLabelValue(self, col)
Called when the grid needs to display a column label.
- GetNumberCols(self)
Return the number of columns in the model.
- GetNumberRows(self)
Return the number of rows in the model.
- GetRowLabelValue(self, row)
Called when the grid needs to display a row label.
- GetTypeName(self, row, col)
Called to determine the kind of editor/renderer to use.
This doesn't necessarily have to be the same type used natively by the editor/renderer if they know how to convert.
- GetValue(self, row, col)
Get the value at the specified row and column.
- IsEmptyCell(self, row, col)
Is the specified cell empty?
- SetValue(self, row, col, value)
Set the value at the specified row and column.