Unplanned
Last Updated: 14 Feb 2021 09:23 by ADMIN
Created by: BlueOcean
Comments: 5
Category: Grid
Type: Feature Request
7

It would be really nice now that we have a grid loader, to be able to customize this using a custom template.

Currently it fixes even the animation type, so while we have chosen a different enum (Pulsing) for all our loaders, our grids now look different because it is not possible currently to change the grid loader beyond turning it on and off.

Completed
Last Updated: 09 Jan 2023 09:29 by ADMIN
Release 4.0.0 (18 Jan 2023) (R1 2023)
Created by: Joeri
Comments: 7
Category: Grid
Type: Feature Request
24

Hello,

First of all: thank you for implementing the Excel like filtering with the new CheckBox Filter! This was a feature that was highly sought after in our development team.

But there is one thing I am missing: the checkbox list has no option for sorting.

If we want to sort our filters now we have to implement the FilterMenuTemplate in every column that has filtering active (which are a lot) and define the list with filter options and filter it ourselves. 

Is this something that can be fixed easily?

---

ADMIN EDIT

We will probably sort ascending the values by default (out-of-the0box), and any other custom sorts should be implemented through the filter menu template.

---

Unplanned
Last Updated: 14 Aug 2023 08:22 by ADMIN
Right now, virtual scrolling can show two loading signs - the large spinner for the entire grid, and the placeholder on each row. It should not show the large spinner with virtualization.
Completed
Last Updated: 10 Jan 2022 13:19 by ADMIN
Release 3.0.0

Using mobile browser (Safari iOS or Chrome Android)
Go to demo grid page
https://demos.telerik.com/blazor-ui/grid/overview
Click any grid's filter menu which contains text field
Try to enter text into textbox.
The filter menu automatically closed, so you can't enter anything

---

ADMIN EDIT

this happens because the keyboard pops up, changes the screen size and may even scroll the page, and both of these events hide the popup menu.

A workaround could be using the filter row mode, with the caveat that it takes up more space on the initial rendering, and that filtering happens immediately.

---

Completed
Last Updated: 01 Apr 2022 09:18 by ADMIN
Release 3.2.0
When using GridSearchBox it shows the text "Search..." in its placeholder, please allow changing this text.
Duplicated
Last Updated: 27 Jan 2021 10:27 by ADMIN

If a new item for a grid is created and the CreateHandler is cancelled due to some validation error, the new loading indicator does not disappear.

protected async void CreateHandler(GridCommandEventArgs args)
{

  var myItem = (MyModel) args.Item;

   if (!IsValid(myItem))
   {
       args.IsCancelled = true;
       return;
    }

   ...

}

Regards,

René

Declined
Last Updated: 21 Jan 2021 17:56 by René
Created by: René
Comments: 4
Category: Grid
Type: Bug Report
1

If in a grid columns are bound to integer values which shall be treated as enum values it can be done with the FieldType parameter.

Unfortunately the new FilterMenuType.CheckBoxList does not work as expected then.

With

<GridColumn Field="@(nameof(MyModel.MyPropertyId))"
                     FieldType="@(typeof(MyPropertyEnum))"
                     Title="MyProperty"
                     FilterMenuType="@FilterMenuType.CheckBoxList">

the filter shows Integers instead of Enum-Strings.

(With FilterMenuType.Menu the filter correctly treats the values as enums)

Regards,

René

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.

---

Unplanned
Last Updated: 25 Jan 2021 08:26 by ADMIN
Created by: Jürgen
Comments: 0
Category: Grid
Type: Feature Request
15
I would like to be able to reposition the Grid Toolbar, for example, to move it to the bottom of the Grid. 
Unplanned
Last Updated: 09 Nov 2021 08:13 by ADMIN
Created by: Shannon
Comments: 0
Category: Grid
Type: Feature Request
2
I would like to be able to use a lasso with the mouse to select multiple rows at once, like here: https://demos.telerik.com/kendo-ui/grid/selection
Declined
Last Updated: 07 Jan 2021 09:16 by ADMIN

Values of FilterMenu are not preserved in GridState. 

If FilterRow is used instead of FilterMenu then the values are preserved in GridState.

(I believe that Filtering was preserved with FilterMenu as well in some previous version but I could be wrong.)

Regards,

René

Completed
Last Updated: 26 Jan 2021 08:46 by ADMIN
Release 2.21.1

Using the keyboard to save items works inconsistently. When editing an item, hitting enter seems to save the change as expected. When inserting an item, however, the item is lost.

---

ADMIN EDIT

Tthe grid calls the OnUpdate handler again, not OnCreate which results in data loss - the newly inserted item is unlikely to match existing data and so it appears to be lost.

Workaround - call the OnCreate handler yourself when the ID of the record is the default for its type - for example, zero for an integer. This indicates a newly inserted record in the grid.

<TelerikGrid Data=@MyData EditMode="@GridEditMode.Inline" Pageable="true" Height="500px" Navigable="true"
             OnUpdate="@UpdateHandler" OnDelete="@DeleteHandler" OnCreate="@CreateHandler" OnCancel="@CancelHandler">
    <GridToolBar>
        <GridCommandButton Command="Add" Icon="add">Add Employee</GridCommandButton>
    </GridToolBar>
    <GridColumns>
        <GridColumn Field=@nameof(SampleData.ID) Title="ID" Editable="false" />
        <GridColumn Field=@nameof(SampleData.Name) Title="Name" />
        <GridCommandColumn>
            <GridCommandButton Command="Save" Icon="save" ShowInEdit="true">Update</GridCommandButton>
            <GridCommandButton Command="Edit" Icon="edit">Edit</GridCommandButton>
            <GridCommandButton Command="Delete" Icon="delete">Delete</GridCommandButton>
            <GridCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true">Cancel</GridCommandButton>
        </GridCommandColumn>
    </GridColumns>
</TelerikGrid>

@code {
        async Task UpdateHandler(GridCommandEventArgs args)
        {
            SampleData item = (SampleData)args.Item;

            if (item.ID == 0)
            {
                await CreateHandler(args);
            }
            else
            {
                // perform actual data source operations here through your service
                await MyService.Update(item);

                // update the local view-model data with the service data
                await GetGridData();

                Console.WriteLine("Update event is fired.");
            }
        }

        async Task DeleteHandler(GridCommandEventArgs args)
        {
            SampleData item = (SampleData)args.Item;

            // perform actual data source operation here through your service
            await MyService.Delete(item);

            // update the local view-model data with the service data
            await GetGridData();

            Console.WriteLine("Delete event is fired.");
        }

        async Task CreateHandler(GridCommandEventArgs args)
        {
            SampleData item = (SampleData)args.Item;

            // perform actual data source operation here through your service
            await MyService.Create(item);

            // update the local view-model data with the service data
            await GetGridData();

            Console.WriteLine("Create event is fired.");
        }

        async Task CancelHandler(GridCommandEventArgs args)
        {
            SampleData item = (SampleData)args.Item;

            // if necessary, perform actual data source operation here through your service

            Console.WriteLine("Cancel event is fired.");
        }


    // in a real case, keep the models in dedicated locations, this is just an easy to copy and see example
    public class SampleData
    {
        public int ID { get; set; }
        public string Name { get; set; }
    }

    public List<SampleData> MyData { get; set; }

    async Task GetGridData()
    {
        MyData = await MyService.Read();
    }

    protected override async Task OnInitializedAsync()
    {
        await GetGridData();
    }

    // the following static class mimics an actual data service that handles the actual data source
    // replace it with your actual service through the DI, this only mimics how the API can look like and works for this standalone page
    public static class MyService
    {
        private static List<SampleData> _data { get; set; } = new List<SampleData>();

        public static async Task Create(SampleData itemToInsert)
        {
            itemToInsert.ID = _data.Count + 1;
            _data.Insert(0, itemToInsert);
        }

        public static async Task<List<SampleData>> Read()
        {
            if (_data.Count < 1)
            {
                for (int i = 1; i < 50; i++)
                {
                    _data.Add(new SampleData()
                    {
                        ID = i,
                        Name = "Name " + i.ToString()
                    });
                }
            }

            return await Task.FromResult(_data);
        }

        public static async Task Update(SampleData itemToUpdate)
        {
            var index = _data.FindIndex(i => i.ID == itemToUpdate.ID);
            if (index != -1)
            {
                _data[index] = itemToUpdate;
            }
        }

        public static async Task Delete(SampleData itemToDelete)
        {
            _data.Remove(itemToDelete);
        }
    }
}

---

 

Declined
Last Updated: 05 Jan 2021 19:56 by Steve
Created by: Steve
Comments: 2
Category: Grid
Type: Feature Request
0

Can you either fix the Export functionality to apply Custom footers that are not aggregated to the exported data or Change Enum options to add a Custom type to allow custom footer template values to be exported along with the other GrigAggregates?

 

 

 
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: 05 Aug 2024 13:31 by ADMIN
Release 6.1.0

---

ADMIN EDIT

Here is a workaround - using a bit of JS to clear the checked state of the checkbox element when you clear the SelectedItems collection:

At the end of this post you can find attached a sample project that showcases a more complex scenario where you may want to keep some rows selected but cancel the selection of others (in that sample, only one row with a given ItemType can be selected). It shows how you can get the index in the rendering of a particular row to use for a slightly modified version of the JS function.

@inject IJSRuntime _js

@* Move JavaScript code to a separate JS file in production *@
<script suppress-error="BL9992">
    function uncheckGrid() {
        var checkboxes = document.querySelectorAll(".no-select .k-grid-checkbox");
        for (var i = 0; i < checkboxes.length; i++) {
            checkboxes[i].checked = false;
        }
    }
</script>

<style>
    .no-select {
        cursor: not-allowed;
    }

    .no-select .k-checkbox {
        pointer-events: none;
    }
</style>

<TelerikGrid Data=@GridData
             SelectionMode="@GridSelectionMode.Multiple"
             SelectedItemsChanged="@((IEnumerable<Employee> employeeList) => OnSelect(employeeList))"
             SelectedItems="@SelectedEmployees"
             Pageable="true"
             Height="400px">
    <GridColumns>
        <GridCheckboxColumn SelectAll="true" OnCellRender="@OnGridCellRender" />
        <GridColumn Field="@nameof(Employee.Name)" />
        <GridColumn Field="@nameof(Employee.Team)" />
        <GridColumn Field="@nameof(Employee.Active)" />
    </GridColumns>
</TelerikGrid>

@if (SelectedEmployees != null)
{
    <ul>
        @foreach (Employee employee in SelectedEmployees)
        {
            <li>
                @employee.Name
            </li>
        }
    </ul>
}

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

    private IEnumerable<Employee> SelectedEmployees { get; set; } = new List<Employee>();

    private void OnGridCellRender(GridCellRenderEventArgs args)
    {
        var product = (Employee)args.Item;
        if (!product.Active)
        {
            args.Class = "no-select";
        }
    }

    protected void OnSelect(IEnumerable<Employee> newSelected)
    {
        var validItemsToSelect = newSelected.Where(x => x.Active);
        SelectedEmployees = validItemsToSelect;
        if (validItemsToSelect.Count() < newSelected.Count())
        {
            _js.InvokeVoidAsync("uncheckGrid");
        }
    }

    protected override void OnInitialized()
    {
        for (int i = 1; i <= 7; i++)
        {
            GridData.Add(new Employee()
            {
                EmployeeId = i,
                Name = $"Employee {i}",
                Team = $"Team {i % 3 + 1}",
                Active = i % 2 == 0
            });
        }
    }

    public class Employee
    {
        public int EmployeeId { get; set; }
        public string Name { get; set; } = string.Empty;
        public string Team { get; set; } = string.Empty;
        public bool Active { get; set; }
    }
}

Unplanned
Last Updated: 23 Dec 2020 15:06 by ADMIN

I localize the names of my columns in the models. This works for the root-level model I bind to the grid, but using nested (navigation) properties does not let them pick up the title.

---

ADMIN EDIT

A sample project is attached that showcases the localization of the displayname attribute, and how that works for the main model. Since it does not work for the nested models, a small helper method to extract the required resource manually is added to the Title parameter of such a column.

---

Completed
Last Updated: 14 Nov 2024 09:27 by ADMIN
Release 7.0.0
Created by: Wei
Comments: 2
Category: Grid
Type: Bug Report
3

When using row virtualization, the visible rows are miscalculated when the browser zoom is used (hold control with mouse scroll). 

The result of the miscalculation is that the first row at some point is not visible.

To reproduce the problem you should scroll to the top of the grid and see the first row.

Then start to zoom down and see how the first row is displaced.

Seems like only 50%, 100%, 150%, 200% (multiply of 50%) are calculated correctly in row virtualization

 

<AdminEdit>

You can reproduce the bug with the attached code.

It's browser-specific and is appearing only in chromium browsers.

It could be related to the way browsers calculate the size of the elements when zooming.

Currently, there is an open bug in the chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1048147&q=component%3AUI%3EBrowser%3EZoom%20height&can=2 

</AdminEdit>

 

Completed
Last Updated: 22 Apr 2024 07:47 by ADMIN
Release 2024 Q2 (May)

Hi Telerik team,

 

When I want to bind the Blazor Grid to an ExpandoObject I need to assign the FieldType. I know I have to use non-nullable types.

But I want to use nullable types (for example int?) to have a blank cell within the Grid when there is no value for it. With "typeof(int)" instead of "typeof(int?)" every empty cell shows "0" which I don't want.

Is there any chance to let FieldType accept nullable types?

 

Best regards,

Rayko

Won't Fix
Last Updated: 15 Jan 2021 17:33 by ADMIN
Scheduled for 2.22.0
Created by: Rayko
Comments: 2
Category: Grid
Type: Bug Report
4

Hi Telerik team,

 

In a Blazor Grid with filters enabled the event "OnStateChanged" is fired twice when I use a filter (set, change, remove).

---

ADMIN EDIT

This behavior is expected - when the grid is filtered, there are two actions that happen:

  1. the Page is reset so that you are sure to see data if it is available (there is no guarantee that there will be enough data to show up on the current page, filtering usually reduces the number of items the grid has)
  2. the Filter is applied

This is not something we intend to change at this point.

---

To reproduce this I took one of the provided examples and added the event handler:


@page "/"

<TelerikGrid Data=@GridData
             SelectionMode="GridSelectionMode.Multiple"
             SelectedItemsChanged="@((IEnumerable<Employee> employeeList) => OnSelect(employeeList))"
             SelectedItems="@PersistedSelectedItems"
             @bind-Page="@CurrentPage"
             PageSize="@PageSize"
             Pageable="true"
             FilterMode="GridFilterMode.FilterRow"
             OnStateChanged="@((GridStateEventArgs<Employee> args) => OnStateChangedHandler(args))">
    <GridColumns>
        <GridCheckboxColumn />
        <GridColumn Field=@nameof(Employee.EmployeeId) />
        <GridColumn Field=@nameof(Employee.Name) />
        <GridColumn Field=@nameof(Employee.Team) />
    </GridColumns>
</TelerikGrid>

@if (PersistedSelectedItems != null)
{
    <ul>
        @foreach (Employee employee in PersistedSelectedItems.OrderBy(e => e.EmployeeId))
        {
            <li>
                @employee.EmployeeId
            </li>
        }
    </ul>
}

@code {
    public List<Employee> PersistedSelectedItems { get; set; } = new List<Employee>();
    int CurrentPage { get; set; }
    int PageSize { get; set; } = 5;

    private async void OnStateChangedHandler(GridStateEventArgs<Employee> args)
    {
        await Task.Delay(5000);
    }

    protected void OnSelect(IEnumerable<Employee> employees)
    {
        IEnumerable<Employee> CurrentPageEmployees = GridData.Skip(PageSize * (CurrentPage - 1)).Take(PageSize);

        if (employees == null || employees.Count() == 0)
        {
            //the user de-selected all items with the header checkbox
            PersistedSelectedItems = PersistedSelectedItems.Except(CurrentPageEmployees).ToList();
        }
        else
        {
            //handle any deselected items
            var UnselectedEmployees = CurrentPageEmployees.Except(employees);
            PersistedSelectedItems = PersistedSelectedItems.Except(UnselectedEmployees).ToList();

            //add any new items if they were not selected already
            foreach (var item in employees)
            {
                if (!PersistedSelectedItems.Contains(item))
                {
                    PersistedSelectedItems.Add(item);
                }
            }
        }
    }

    //data binding and sample data
    public List<Employee> GridData { get; set; }

    protected override void OnInitialized()
    {
        GridData = new List<Employee>();
        for (int i = 0; i < 15; i++)
        {
            GridData.Add(new Employee()
            {
                EmployeeId = i,
                Name = "Employee " + i.ToString(),
                Team = "Team " + i % 3
            });
        }
    }

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

Best regards,

Rayko

Completed
Last Updated: 14 Nov 2024 09:27 by ADMIN
Release 7.0.0

Hi,

  

I am using a Blazor TelerikGrid component with Virtual ScrollMode.  I have set a fixed Height, PageSize that exceeds the rows that fit in the grid, and a RowHeight which I have confirmed fits the row contents and resolves to a computed Height of the same value (using Chrome Dev Tools -> Computed tab).  Everything works fine except that sometimes scrolling does not trigger the OnRead event and the rows displayed after scrolling are placeholders. 

I don't experience this problem when I click the scroll arrow buttons (up or down).  I don't experience the problem at all if I drag the scroll bar up or down.  But if I page up/down, or click on the scroll page area up/down it will sometimes work and sometimes not.  If placeholders are shown, I only need to click a scroll button up/down a few times for it to then read and display the correct rows.

To reproduce use the attached VS2019 project, click "Telerik Scroll Issue" nav menu, and in the TelerikGrid click the page down areas of the vertical scrollbar 3 times.




 

<AdminEdit>

The bug is only reproducible with 4k monitor and 200% DPI on Edge Chromium. Also when the "Microsoft Edge scrolling personality" flag from edge://flags/ is disabled, there is no problem.

</AdminEdit>