Row Actions in Blazor Hierarchical Grid

    The Ignite UI for Blazor Row Actions feature in Blazor Hierarchical Grid enables developers to use an IgbActionStrip and utilize CRUD for row/cell components and row pinning. There are several predefined UI controls for these operations that are applicable to a specific row in the IgbHierarchicalGrid – editing and pinning.

    Usage

    The predefined actions UI components are:

    They are added inside the IgbHierarchicalGrid and this is all needed to have an IgbActionStrip providing default interactions.

    <IgbHierarchicalGrid Data=northwindEmployees RowEditable="True" PrimaryKey="ID">
        @foreach (var c in columns)
        {
            <IgbColumn Field="@c.Field">
            </IgbColumn>
        }
        <IgbActionStrip @ref=actionstrip>
            <IgbGridPinningActions></IgbGridPinningActions>
            <IgbGridEditingActions></IgbGridEditingActions>
        </IgbActionStrip>
    </IgbHierarchicalGrid>
    razor

    When ActionStripComponent is a child component of the IgbHierarchicalGrid, hovering a row will automatically show the UI.

    Custom Implementation

    These components expose templates giving flexibility for customization. For instance, if we would like to use the IgbActionStrip for a Gmail scenario with row actions such as delete, edit and etc. You can simply create button component with icon, add click event to it and insert it into the IgbActionStrip.

    <div class="grid__wrapper">
        <IgbHierarchicalGrid Data=northwindEmployees>
            <IgbActionStrip @ref=actionstrip>
                <IgbGridPinningActions></IgbGridPinningActions>
                <IgbButton Title="Edit" @onclick="() => StartEdit(actionstrip.Context)">
                    <IgbIcon>edit</IgbIcon>
                </IgbButton>
                @if (!IsDeleted(actionstrip.Context))
                {
                    <IgbButton Title="Delete" @onclick="() => Delete(actionstrip.Context)">
                        <IgbIcon>delete</IgbIcon>
                    </IgbButton>
                }
            </IgbActionStrip>
        </IgbHierarchicalGrid>
    </div>
    razor

    EXAMPLE
    MODULES
    DATA
    RAZOR
    CSS

    Like this sample? Get access to our complete Ignite UI for Blazor toolkit and start building your own apps in minutes. Download it for free.

    API References

    Our community is active and always welcoming to new ideas.