Open Closed

Blazor - Action Button - DataGridEntityActionsColumn with single EntityAction #1431


User avatar
0
cellero created

Version: 4.3.2 Blazor Server with EF. A DataGrid has a single EntityAction in DataGridEntityActionsColumn as per the razor code below. With a single action the button should show as a single button instead of a Button with dropdown, but it continues to show as a drop down.

Please advise how to show a Entity Action as a single button without a drop down.

  <DataGridEntityActionsColumn TItem="ClientWithNavigationPropertiesDto" @ref="@EntityActionsColumn">
                    <DisplayTemplate>
                        <EntityActions TItem="ClientWithNavigationPropertiesDto" EntityActionsColumn="@EntityActionsColumn">
                            <EntityAction TItem="ClientWithNavigationPropertiesDto"
                                          RequiredPolicy="@ABcrmPermissions.Clients.Create"
                                          Clicked="() => NavigateToClientDetailPage(context.Client.Id)"
                                          Text="@L["Details"]"></EntityAction>
                        </EntityActions>
                    </DisplayTemplate>
                </DataGridEntityActionsColumn>


7 Answer(s)
  • User Avatar
    0
    alper created
    Support Team Director

    This doesn't seem to be implemented as documented. I'll check again and write to you

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

  • User Avatar
    0
    mtozdemir created

    This ticket is asked by another user in Discord. So I unlocked it.

  • User Avatar
    0
    shaynevanasperen@gmail.com created

    Yes, it was me that asked this question. Could this be reported as a bug?

  • User Avatar
    1
    lizhaofeng created

    Currently, a single button can only be implemented using the following method. However, it is desired that the button should not be displayed if there is no list.

    There may be scenarios where users do not have permission, resulting in only a single button appearing.

  • User Avatar
    1
    alper created
    Support Team Director

    Shayne it's not a bug and already implemented.

    See https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor#L37C25-L37C41

  • User Avatar
    0
    lizhaofeng created

    Shayne it's not a bug and already implemented.

    See https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor#L37C25-L37C41

    Hi alper ABP Suite generates CRUD pages using the DataGrid by default rather than AbpExtensibleDataGrid, the issue may still exist for DataGrid.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09