Last Updated: 10 Nov 2020 10:04 by ADMIN
Release 2.19.0
Jan Hindrik
Created on: 24 Sep 2020 15:12
Category: Grid
Type: Bug Report
FooterTemplate throws when grid Data is null

Sample reproducible with workaround (to initialize the data source so it is not null) is below

Sample error and stack trace

ArgumentNullException: Value cannot be null. (Parameter 'source')

System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
System.Linq.Enumerable.ToList<TSource>(IEnumerable<TSource> source)
Telerik.Blazor.Components.TelerikGrid<TItem>.SetAggregateResults(IEnumerable<AggregateResult> results)


<TelerikGrid Data=@GridData Pageable="true" Height="300px">
        <GridColumn Field="@(nameof(Employee.EmployeeId))">
                some footer
        <GridColumn Field=@nameof(Employee.Salary) Title="Salary">
        <GridColumn Field=@nameof(Employee.Name)>

@code {
    public List<Employee> GridData { get; set; } // = new List<Employee>(); // workaround

    public class Employee
        public int EmployeeId { get; set; }
        public string Name { get; set; }
        public decimal Salary { get; set; }