Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -416,3 +416,4 @@ FodyWeavers.xsd
*.msix
*.msm
*.msp
*.xlsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Concurrent;
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Net;
using System.Reflection;
Expand All @@ -20,6 +20,7 @@ public static IReadOnlyList<ExportColumn<TItem>> Resolve<TItem>(SuperDataGrid<TI
{
var result = new List<ExportColumn<TItem>>();

int idx = 0;
foreach (var column in grid.ColumnsCollection.Where(c => c.Exportable && c.IsCurrentlyVisible))
{
var header = FirstNotEmpty(
Expand All @@ -31,9 +32,11 @@ public static IReadOnlyList<ExportColumn<TItem>> Resolve<TItem>(SuperDataGrid<TI
if (string.IsNullOrWhiteSpace(header))
{
throw new InvalidOperationException(
"An exportable grid column has no resolvable header. Set ExportHeader on the column.");
$"An exportable grid column has no resolvable header. Set ExportHeader on the column index {idx}.");
}

idx++;

Func<TItem, object?> accessor;
if (column.ExportValue is not null)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>SuperBlazorComponents.DataGridExporter</RootNamespace>
<AssemblyName>SuperBlazorComponents.DataGridExporter</AssemblyName>
<VersionPrefix>2.0.9</VersionPrefix>
<VersionPrefix>2.0.10</VersionPrefix>
<PackageId>SuperBlazorComponents.DataGridExporter</PackageId>
<Title>SuperBlazorComponents DataGrid Exporter</Title>
<Authors>Appliman</Authors>
Expand Down
Loading