FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TemplateColumn

    struct · ferroui-controls-treedatagrid · v0.5.0

    struct TemplateColumn<M: TreeModel>
    

    TemplateColumn<TModel>.

    View source

    Members

    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.

    Source

    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.

    Source

    options

    fn options(self: &Self) -> &Rc<TemplateColumnOptions<M>>
    

    The options of the column.

    Source

    set_header

    fn set_header(self: &Self, value: Option<BoxedValue>)
    

    Sets the column header.

    Source

    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).

    Source

    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.

    Source

    create_cell_of

    fn create_cell_of(self: &Self, model: &Rc<M>) -> CellRef
    

    The cell of model.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.