Hi,
I have a DataGrid where I have a Custom Name column to make it clickable.
When adding the template my ExcelExport fails with the following error:
I'm using SyncFusion + XlsIO.Net.Core v19.1.0.58
System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection. Arg_ParamName_Name'
StackTrace
at System.ThrowHelper.ThrowArgumentOutOfRange_IndexException()
at Syncfusion.Blazor.Grids.Internal.GridExcelExport`1.ProcessSummaryRow(IQueryable items, Boolean totalSummary, Group`1 GroupData)
at Syncfusion.Blazor.Grids.Internal.GridExcelExport`1.ProcessGridContents()
at Syncfusion.Blazor.Grids.Internal.GridExcelExport`1.IterateElements()
at Syncfusion.Blazor.Grids.Internal.GridExcelExport`1.d__156.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Syncfusion.Blazor.Grids.Internal.GridExcelExport`1.d__153.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Syncfusion.Blazor.Grids.Internal.GridExcelExport`1.d__154.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Syncfusion.Blazor.Grids.SfGrid`1.d__898.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MinServiceAssistent.Pages.TaskList.TaskList.d__56.MoveNext() in
...\Pages\TaskList\TaskList.razor:line 580
If I comment out the Template part of the grid, the ExcelExport works fine.
Grid Column
@{
var item = (context as TaskViewModel);
EditStory(item))" class="mouse-pointer" storyclosed="@item.IsClosed">@item.Name
}
My viewModel is the following
public class TaskViewModel
{
public string ID { get; set; }
public string Name { get; set; }
public double Estimate { get; set; }
public double TimeSpent { get; set; }
public string Category { get; set; }
public string Type { get; set; }
public string Owner { get; set; }
public string Team { get; set; }
public string Afdeling { get; set; }
public string KontaktPerson { get; set; }
public string Phone { get; set; }
public string Adresse { get; set; }
public string AdresseNr { get; set; }
public string AdresseDoor { get; set; }
public string Week { get; set; }
public string Day { get; set; }
public string Time { get; set; }
public DateTime Date { get; set; }
public string Status { get; set; }
public bool IsClosed { get; set; }
}