From b043d62b8e5cde3275cc26635c2783c94cea0959 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Wed, 27 Mar 2024 21:53:15 +0800 Subject: [PATCH] Add AutoGenerateColumns to prevent auto-generated columns --- .../Components/AbpExtensibleDataGrid.razor | 4 ++++ .../Components/AbpExtensibleDataGrid.razor.cs | 2 ++ 2 files changed, 6 insertions(+) diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor index b38f4afaa9c..3c6cfb38555 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor @@ -159,5 +159,9 @@ } } } + @if (!AutoGenerateColumns) + { + + } diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor.cs b/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor.cs index 4642afcadd7..5a9bc08df51 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor.cs @@ -35,6 +35,8 @@ public partial class AbpExtensibleDataGrid : ComponentBase [Parameter] public string? Class { get; set; } [Parameter] public bool Responsive { get; set; } + + [Parameter] public bool AutoGenerateColumns { get; set; } [Inject] public IStringLocalizerFactory StringLocalizerFactory { get; set; } = default!;