diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo/Abp/AspNetCore/Components/Web/Extensibility/TableColumns/TableColumn.cs b/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo/Abp/AspNetCore/Components/Web/Extensibility/TableColumns/TableColumn.cs index 9a6a40a17a..aa48ad633b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo/Abp/AspNetCore/Components/Web/Extensibility/TableColumns/TableColumn.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo/Abp/AspNetCore/Components/Web/Extensibility/TableColumns/TableColumn.cs @@ -10,14 +10,22 @@ public class TableColumn { public string Title { get; set; } public string Data { get; set; } + + public string PropertyName { get; set; } + [CanBeNull] public string DisplayFormat { get; set; } + public IFormatProvider DisplayFormatProvider { get; set; } = CultureInfo.CurrentCulture; + [CanBeNull] public Type Component { get; set; } + public List Actions { get; set; } + [CanBeNull] public Func ValueConverter { get; set; } + public bool Sortable { get; set; } public TableColumn() diff --git a/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs b/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs index 1e3cf13549..653752b170 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs @@ -608,7 +608,8 @@ public abstract class AbpCrudPageBase< yield return new TableColumn { Title = lookupPropertyDefinition.GetLocalizedDisplayName(StringLocalizerFactory), - Data = $"ExtraProperties[{propertyInfo.Name}]" + Data = $"ExtraProperties[{propertyInfo.Name}]", + PropertyName = propertyInfo.Name }; } else @@ -616,7 +617,8 @@ public abstract class AbpCrudPageBase< var column = new TableColumn { Title = propertyInfo.GetLocalizedDisplayName(StringLocalizerFactory), - Data = $"ExtraProperties[{propertyInfo.Name}]" + Data = $"ExtraProperties[{propertyInfo.Name}]", + PropertyName = propertyInfo.Name }; if (propertyInfo.IsDate() || propertyInfo.IsDateTime()) diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor index 0e5e76b3ec..88a0a1df4a 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor @@ -105,7 +105,7 @@ } else { - + @{ var entity = context as IHasExtraProperties;