Completed
Last Updated: 26 May 2022 18:19 by ADMIN
Release 3.4.0

The exception is -

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

Here is a test page, based on this one -

@using Telerik.DataSource
@using Telerik.DataSource.Extensions
@using System.IO

<TelerikGrid TItem="@object"
             LoadGroupsOnDemand="true"
             Groupable="true"
             OnStateInit="@((GridStateEventArgs<object> args) => OnStateInitHandler(args))"
             OnRead="@ReadItems"
             ScrollMode="@GridScrollMode.Virtual" PageSize="20" RowHeight="60"
             Navigable="true" Sortable="true" FilterMode="@GridFilterMode.FilterRow" Height="600px">
    <GridColumns>
        <GridColumn Field="@nameof(Employee.Name)" FieldType="@typeof(string)" Groupable="false" />
        <GridColumn Field="@nameof(Employee.Team)" FieldType="@typeof(string)" Title="Team" />
        <GridColumn Field="@nameof(Employee.Salary)" FieldType="@typeof(decimal)" Groupable="false" />
        <GridColumn Field="@nameof(Employee.IsOnLeave)" FieldType="@typeof(bool)" Title="On Vacation" />
    </GridColumns>
</TelerikGrid>

@code {
    List<object> GridData { get; set; }

    protected async Task ReadItems(GridReadEventArgs args)
    {
        DataEnvelope<Employee> result = await MyService.GetData(args.Request);

        if (args.Request.Groups.Count > 0)
        {
            args.Data = result.GroupedData.Cast<AggregateFunctionsGroup>().ToList();
        }
        else
        {
            args.Data = result.CurrentPageData.Cast<Employee>().ToList();
        }

        args.Total = result.TotalItemCount;

        if (args.Request.Groups.Count > 0)
        {
            try
            {
                List<AggregateFunctionsGroup> items = result.GroupedData.Cast<AggregateFunctionsGroup>().ToList();

                await using var s = new MemoryStream();
                await System.Text.Json.JsonSerializer.SerializeAsync(s, items);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
    }

    void OnStateInitHandler(GridStateEventArgs<object> args)
    {
        // set initial grouping
        GridState<object> desiredState = new GridState<object>()
        {
            GroupDescriptors = new List<GroupDescriptor>()
    {
                new GroupDescriptor()
                {
                    Member = "Team",
                    MemberType = typeof(string)
                },
                new GroupDescriptor()
                {
                    Member = "IsOnLeave",
                    MemberType = typeof(bool)
                }
            }
        };

        args.GridState = desiredState;
    }

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

    public class DataEnvelope<T>
    {
        public List<AggregateFunctionsGroup> GroupedData { get; set; }
        public List<T> CurrentPageData { get; set; }
        public int TotalItemCount { get; set; }
    }

    public static class MyService
    {
        private static List<Employee> SourceData { get; set; }
        public static async Task<DataEnvelope<Employee>> GetData(DataSourceRequest request)
        {
            if (SourceData == null)
            {
                SourceData = new List<Employee>();
                var rand = new Random();
                for (int i = 1; i <= 2500; i++)
                {
                    SourceData.Add(new Employee()
                    {
                        EmployeeId = i,
                        Name = "Employee " + i.ToString(),
                        Team = "Team " + i % 100,
                        IsOnLeave = i % 3 == 0,
                        Salary = rand.Next(1000, 5000)
                    });
                }
            }

            await Task.Delay(500);// deliberate delay to showcase async operations, remove in a real app

            // retrieve data as needed, you can find more examples and runnable projects here
            // https://github.com/telerik/blazor-ui/tree/master/grid/datasourcerequest-on-server
            var datasourceResult = SourceData.ToDataSourceResult(request);

            DataEnvelope<Employee> dataToReturn;

            if (request.Groups.Count > 0)
            {
                dataToReturn = new DataEnvelope<Employee>
                {
                    GroupedData = datasourceResult.Data.Cast<AggregateFunctionsGroup>().ToList(),
                    TotalItemCount = datasourceResult.Total
                };
            }
            else
            {
                dataToReturn = new DataEnvelope<Employee>
                {
                    CurrentPageData = datasourceResult.Data.Cast<Employee>().ToList(),
                    TotalItemCount = datasourceResult.Total
                };
            }

            return await Task.FromResult(dataToReturn);
        }
    }
}

Completed
Last Updated: 27 Sep 2023 14:44 by ADMIN
Release 4.6.0 (11 Oct 2023) (R3 2023)

Using the following configuration does not produce the expected result:

 

 <GridSettings>
        <GridPopupEditFormSettings ButtonsLayout="FormButtonsLayout.Center"/>
 </GridSettings>

 

The button layout is always left no matter what you choose.

===

ADMIN EDIT

===

Possible workarounds for the time being are to position the buttons with CSS or use a Popup Buttons Template.

Completed
Last Updated: 04 Jul 2023 09:29 by ADMIN
Release 4.4.0 (07/19/2023) (R3 PI1)
The OnCellRender event is executed more times than expected.
Completed
Last Updated: 09 Sep 2020 08:41 by ADMIN
Release 2.17.0
Loading the state does not populate the data in the filter menu popup (such as filter value and operator), but the filter operation happens as expected.
Completed
Last Updated: 12 Apr 2024 15:40 by ADMIN
Release 2024 Q2 (May)

There is a change in the Grid behavior from version 4.6.0 to 5.0.0.

Consider the following REPL test page: https://blazorrepl.telerik.com/cSabmRPy306iPiXK18

Clicking on a Grid cell for editing will not open it for editing if there is already an open cell in edit mode on the same table row. The issue is reproduced more easily if the OnUpdate handler is empty or not defined at all.

This used to work in version 4.6.0.

Completed
Last Updated: 29 Sep 2023 06:42 by ADMIN
Release 4.6.0 (11 Oct 2023) (R3 2023)

Hello,

in some cases there is no way to scroll grid using mousewheel. Try this REPL please - https://blazorrepl.telerik.com/GdkXuLuX10P8sOF040. Scroll down, focus any cell in the last row and try to scroll up using your mouse wheel again.  Grid always scrolls back to the last row.

Can you check that please?

Very thanks.

Miroslav

Completed
Last Updated: 30 Jan 2024 13:48 by ADMIN
Release 2024 Q1 (Jan)

The filter list item menu defined as follows do not have accessible name.  Please provide work around or fix that I can implement.

                            <TelerikGrid Data="@ViewModel.RouterAndDataLossInformation" TItem="TrafficLossSummary"
                                                        Pageable="true" 
                                                        Sortable="true" 
                                                        Groupable="false"
                                                        FilterMode="Telerik.Blazor.GridFilterMode.FilterRow"
                                                        Resizable="true" 
                                                        Reorderable="true"
                                                        Height = "100%">

Completed
Last Updated: 30 Jul 2020 16:54 by ADMIN
Release 2.14.0
The widths of the columns become the widths of the initially rendered column at the same index, instead of the widths declared in the respective column markup.
Completed
Last Updated: 04 Feb 2021 03:01 by ADMIN
Release 2.22.0

The orderby clause only has one column when multicolumn sorting is enabled, you can test it with this sample.

---

ADMIN EDIT

A workaround is to replace the orderby generated by the grid with your own clause that uses the DataSourceRequest to extract all sort descriptors, here's an example:

@using System.Net.Http.Json
@using System.Text.RegularExpressions
@using Telerik.Blazor.Extensions
@using WasmApp.Shared
@inject HttpClient Http

<TelerikGrid Data=@GridData
             Height="460px"
             RowHeight="60"
             PageSize="10"
             Pageable="true"
             Sortable="true"
             FilterMode="@GridFilterMode.FilterRow"
             SortMode="@SortMode.Multiple"
             OnRead=@ReadItems
             TotalCount=@Total>
    <GridColumns>
        <GridColumn Field="ProductID" />
        <GridColumn Field="ProductName" />
        <GridColumn Field="Discontinued" />
    </GridColumns>
</TelerikGrid>

@code{
    public List<ODataProduct> GridData { get; set; } = new List<ODataProduct>();
    public int Total { get; set; } = 0;

    protected async Task ReadItems(GridReadEventArgs args)
    {
        var baseUrl = "https://demos.telerik.com/kendo-ui/service-v4/odata/Products?";

        string OdataUrl = args.Request.ToODataString();

        // replace the original orederby clause with one that contains all the order rules
        Regex x = new Regex("(orderby=)(.*?)(&)", RegexOptions.IgnoreCase);
        string actualOrderByClause = "orderby=";

        for (int i = 0; i < args.Request.Sorts.Count; i++)
        {
            if (i > 0)
            {
                actualOrderByClause += ",";
            }
            string order = args.Request.Sorts[i].SortDirection == Telerik.DataSource.ListSortDirection.Ascending ? "" : "%20desc";
            actualOrderByClause += $"{args.Request.Sorts[i].Member}{order}";
        }

        actualOrderByClause += "&";

        string OdataQueryWithMultipleOrder = x.Replace(OdataUrl, actualOrderByClause);

        //do the request as usual
        var requestUrl = $"{baseUrl}{OdataQueryWithMultipleOrder}";

        ODataResponseOrders response = await Http.GetFromJsonAsync<ODataResponseOrders>(requestUrl);

        GridData = response.Products;
        Total = response.Total;
    }
}

---

Completed
Last Updated: 20 Jan 2023 09:07 by ADMIN
Release 4.0.1

As of UI for Blazor 4.0. ExcelExportableColumn is inaccessible due to its protection level and GridExcelExportColumn should be used instead.

I am trying to add the hidden columns to the exported file through the OnBeforeExport event. However, I am unable to create an exportable column instance using the GridExcelExportColumn. I get the following error:

CS1729: GridExcelExportColumn does not contain a constructor that takes 0 arguments.

 

Completed
Last Updated: 27 Jan 2021 07:40 by ADMIN
Release 2.21.1

If you set args.IsCancelled=true in any CUD event handler, the loading sign will never go away.

---

ADMIN EDIT

If you don't need to cancel the event (e.g., because remote validation or data operation failed), you should avoid cancelling it - its purpose is to keep the grid in the current mode (edit/insert) when the operation fails so the user does not lose data.

That said, the loading sing should disappear in thsoe cases too, and a workaround is to disable it by setting the EnableLoaderContainer="false" parameter of the grid.

---

Completed
Last Updated: 03 Apr 2020 16:17 by ADMIN



<TelerikGrid Data="@GridData"
             FilterMode="Telerik.Blazor.GridFilterMode.FilterRow"
             SelectionMode="@GridSelectionMode.Multiple"
             @bind-SelectedItems="SelectedItems">
    <GridColumns>
        <GridCheckboxColumn Width="35px"/>
         <GridColumn Field="@(nameof(Data.Name))" />
     </GridColumns>
 </TelerikGrid>

@code{

    public class Data
    {
        public string Name { get; set; }
    }

    public List<Data> GridData { get; set; }
    public IEnumerable<Data> SelectedItems { get; set; }
    protected override void OnInitialized()
    {
        GridData = new List<Data>();
        SelectedItems = new List<Data>();
        GridData.Add(new Data{Name="abc"});
        GridData.Add(new Data{Name="abe"});
        GridData.Add(new Data{Name="xyz"});
    }
}

1. Filter the above grid by "abc" (the filtered grid will display "abc" correctly as the only entry)

2. Click into the "SelectAll" Checkbox (SelectedItems will wrongly contain "abc" AND "abe" !!!)

3. Click on "ClearFilter" Button --> the grid will display both "abc" and "abe" as selected !!!

 

It might be an indexing problem because the "SelectAll" Logic always seems to ignore the last character of the search string while the filtering of the display takes all characters into account.

This bug has cost be many hours and stomach pain!  Please let me know, if this will be fixed soon.  If not I will have to implement my own filtering (which makes me wonder why I'm using Telerik UI).

 

Completed
Last Updated: 06 Jul 2021 12:46 by ADMIN
Release 2.26.0

I have a Grid and if the initial validation fails for a certain cell and the user edits a cell with a valid value on the same row the editing freezes. 

<AdminEdit>

As a workaround, you can provide valid initial values for all cells in the Grid.

</AdminEdit>

Completed
Last Updated: 19 May 2020 07:25 by ADMIN
Release 2.14.0
Having a popup opened (such as the  filter menu or a date picker) and scrolling (or clicking a scrollbar - be that on the grid or not) throws an exception in WASM scenario. The error is "Error: Unknown edit type: 0"
Completed
Last Updated: 17 Aug 2023 19:34 by Andy
Release 2.25.0

I want to be able to use interfaces and models that are created from a service when working with the grid. A parameterless constructor is not enough for me, I need to be able to instantiate models in a more complex manner.

---

ADMIN EDIT

The tentative event name I have put in the title might vary when the implementation is researched. The goal would still be the same - the grid to provide an event when it needs an instance of the model so you can provide it with one. At the moment this happens when a row enters edit mode, when the filter list needs to be built, and when you are inserting an item (a caveat with the last one might be the OnClick event for the command button - the new event might have to fire before OnClick so it can give you the model).

---

Completed
Last Updated: 09 Dec 2019 15:12 by ADMIN
Created by: Andriy
Comments: 2
Category: Grid
Type: Feature Request
3
Hi, Marin
I want to localize caption in right-bottom corner where pager wrote record number and total values.
How I can do this?
Thank you.
Completed
Last Updated: 08 Dec 2021 14:11 by ADMIN

I have a WASM application and I setup my Grid to use the editor as an editing field in the Grid. When the user types something the application is laggy and it might even hang.

---

ADMIN EDIT

Attached is a sample app that alleviates this a little by using a regular textarea and making editor updates less frequent.

---

Completed
Last Updated: 27 Oct 2023 13:36 by ADMIN
Release 5.0.0 (15 Nov 2023) (R1 PI1)
The Grid throws on Dispose when there is a Tabstip also on the same razor page. When there is not Tabstrip the Grid does not throw this exception. 
Completed
Last Updated: 03 Dec 2021 14:32 by ADMIN
Release 2.30.0
Created by: Radko
Comments: 0
Category: Grid
Type: Feature Request
3
I would like to be able to set constraints for min and max width for the draggable resizing introduced by the Resizable parameter of the Column. Meaning, if I set a min width of 50 pixels, I would like for the column to not be able to shrink beyond this point when manually resized by the draggable handle.
Completed
Last Updated: 25 Apr 2024 08:35 by ADMIN
Release 2024 Q2 (May)

The null type of operator can cause errors on the backend

*** Thread created by admin on customer behalf ***