فتح مغلق

Blazor - Action Button - DataGridEntityActionsColumn with single EntityAction #1431


User avatar
0
cellero خلقت

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 إجابة (إجابات)
  • User Avatar
    0
    alper خلقت
    فريق الدعم Director

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

  • User Avatar
    0
    ServiceBot خلقت
    فريق الدعم Automatic process manager

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

  • User Avatar
    0
    mtozdemir خلقت

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

  • User Avatar
    0
    shaynevanasperen@gmail.com خلقت

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

  • User Avatar
    1
    lizhaofeng خلقت

    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 خلقت
    فريق الدعم 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 خلقت

    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 v8.2.0-preview Updated on مارس 25, 2024, 15:11