TemplateColumn
struct · ferroui-controls-treedatagrid · v0.5.0
struct TemplateColumn<M: TreeModel>
TemplateColumn<TModel>.
Members
newfrom_resource_keysoptionsset_headerget_cell_templateget_cell_editing_templatecreate_cell_of
new
fn new(header: Option<BoxedValue>, cell_template: Rc<dyn IDataTemplate>, cell_editing_template: Option<Rc<dyn IDataTemplate>>, width: Option<GridLength>, options: Option<Rc<TemplateColumnOptions<M>>>) -> Rc<Self>
A column whose cells cell_template shows and cell_editing_template edits.
from_resource_keys
fn from_resource_keys(header: Option<BoxedValue>, cell_template_resource_key: ResourceKey, cell_editing_template_resource_key: Option<ResourceKey>, width: Option<GridLength>, options: Option<Rc<TemplateColumnOptions<M>>>) -> Rc<Self>
A column whose cells the data template resource cell_template_resource_key shows and the
resource cell_editing_template_resource_key edits, looked up from the resources of the
cell the first time a cell is shown.
options
fn options(self: &Self) -> &Rc<TemplateColumnOptions<M>>
The options of the column.
set_header
fn set_header(self: &Self, value: Option<BoxedValue>)
Sets the column header.
get_cell_template
fn get_cell_template(self: &Self, anchor: &Control) -> Rc<dyn IDataTemplate>
The template of the cells that are not editing.
Panics
When the column's template resource cannot be found from anchor (KeyNotFoundException).
get_cell_editing_template
fn get_cell_editing_template(self: &Self, anchor: &Control) -> Rc<dyn IDataTemplate>
The template of the cells that are editing.
Panics
When the column has no editing template, or its resource cannot be found from anchor.
create_cell_of
fn create_cell_of(self: &Self, model: &Rc<M>) -> CellRef
The cell of model.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeIViewColumn<M>Borrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherINotifyPropertyChangedIColumnIUpdateColumnLayoutICellColumnIColumnOf<M>IValueColumn<M>
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.