Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.16 KB

README.md

File metadata and controls

41 lines (31 loc) · 1.16 KB

Umbraco Checkbox Table

Property editor for a table with editable rows/columns and toggleable cells.

The NuGet package installs a single assembly Our.Umbraco.CheckboxTable.dll which has a dependency on Umbraco Embedded Resource.

Property Editor

Property Editor Example

Property Editor Configuration

Property Editor Configuration Example

Model Rendering

@{
    // model (as would be set)
    Our.Umbraco.CheckboxTable.Models.CheckboxTable checkboxTable; 
}

<table>
    <tr>
        <th></th> <!-- irrelevant cell -->
        @foreach (var columnLabel in checkboxTable.ColumnLabels)
        {
            <th>@columnLabel</th>
        }
    </tr>
    @foreach (var row in checkboxTable.Rows)
    {
        <tr>
            <td>@row.RowLabel</td>
            @foreach (var cell in row.Cells)
            {
                <td>@(cell ? "X" : "")</td>
            }
        </tr>
    }
</table>