abp icon indicating copy to clipboard operation
abp copied to clipboard

AbpExtensibleDataGrid Displays no data when using SetTableColumnsAsync

Open rlavaud opened this issue 4 years ago • 1 comments

5.2.2 Open Source. Blazor WebAssembly EFCore Postgresql

Created a simple CrudPage to display a list of Dto using AbpExtensibleDataGrid

I set the Actions and Column in code

When I run the app, the action shows up and works. The title shows up with the correct names, the correct number of items shows up but no data in the column show up.

I have looked at the dto list and the data is there.

image

I feel like I am missing something because I compared my code against the Tenant Management module and it is the same. Here is some relevant code

` protected override ValueTask SetTableColumnsAsync() {

        PartnerManagementTableColumns
            .AddRange(new TableColumn[]
            {
                new TableColumn
                {
                    Title = L["Actions"],
                    Actions = EntityActions.Get<PartnerManagement>(),
                },
                new TableColumn
                {
                    Title = L["PartnerName"],
                    Sortable = true,
                    Data = nameof(PartnerDto.DisplayName),
                },
                new TableColumn
                {
                    Title = L["PartnerEmail"],
                    Sortable = true,
                    Data = nameof(PartnerDto.Email),
                },
                

            });

        PartnerManagementTableColumns.AddRange(GetExtensionTableColumns(
            SystemManagementModuleExtensionConsts.ModuleName,
            SystemManagementModuleExtensionConsts.EntityNames.Partner));

        return base.SetTableColumnsAsync();
    }

`

rlavaud avatar May 22 '22 15:05 rlavaud

I figure it out. The Dto had private setters by mistake.

rlavaud avatar May 22 '22 20:05 rlavaud