Completed
Last Updated: 22 Aug 2023 09:10 by ADMIN
Release 4.5.0 (08/30/2023) (R3 PI2)
Patrick
Created on: 13 Nov 2020 13:31
Category: Grid
Type: Bug Report
8
Scrolling with the keyboard in a Grid wit virtual scrolling stops working after first page number of rows

By the following steps, the problem occurs:

  1. Click on line number 1 to focus the row
  2. Press the Down-Key 19 times to navigate to line 20
  3. Try to navigate to line 21 via the Down-Key
  4. -> No navigation possible via keyboard to the lines below
  5. Try to navigate backwards via Up-Key to line 1
  6. -> Navigation stops at line 15


So, it not possible to navigate through the whole grid with virtualized rows when Navigable=true





@* Scroll the grid instead of paging *@

<TelerikGrid Data=@GridData
             ScrollMode="@GridScrollMode.Virtual" Navigable="true"
             Height="480px" RowHeight="60" PageSize="20"
             Sortable="true" FilterMode="@GridFilterMode.FilterMenu">
    <GridColumns>
        <GridColumn Field="Id" />
        <GridColumn Field="Name" Title="First Name" />
        <GridColumn Field="LastName" Title="Last Name" />
        <GridColumn Field="HireData" Width="200px">
            <Template>
                @((context as SampleData).HireDate.ToString("MMMM dd, yyyy"))
            </Template>
        </GridColumn>
    </GridColumns>
</TelerikGrid>

@code {
    public List<SampleData> GridData { get; set; }

    protected override async Task OnInitializedAsync()
    {
        GridData = await GetData();
    }

    private async Task<List<SampleData>> GetData()
    {
        return Enumerable.Range(1, 1000).Select(x => new SampleData
        {
            Id = x,
            Name = $"name {x}",
            LastName = $"Surname {x}",
            HireDate = DateTime.Now.Date.AddDays(-x)
        }).ToList();
    }

    public class SampleData
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string LastName { get; set; }
        public DateTime HireDate { get; set; }
    }
}

  
0 comments