Unplanned
Last Updated: 11 Nov 2022 11:36 by
Created on: 11 Nov 2022 11:36
Category: Grid
Type: Feature Request
12
Improve Grid Selection Performance with Command Column in WASM

The Grid selection performance is worse in WASM when there is a command column. Here is a test page with a large page size, which makes this more evident.

<label><TelerikCheckBox @bind-Value="@ShowCommandColumn" /> Show Command Column</label>

<TelerikGrid Data="@DataList"
             SelectionMode="@GridSelectionMode.Single"
             Height="700px">
    <GridColumns>
        <GridColumn Field="@(nameof(DataModel.Pos))" Title="Pos" />
        @if (ShowCommandColumn)
        {
            <GridCommandColumn Width="300px">
                <GridCommandButton Command="Save" Icon="save">Reset Volume</GridCommandButton>
                <GridCommandButton Command="Delete" Icon="delete">Delete</GridCommandButton>
            </GridCommandColumn>
        }
    </GridColumns>
</TelerikGrid>

@code {

    bool ShowCommandColumn { get; set; } = true;

    List<DataModel> DataList { get; set; }

    protected override async Task OnInitializedAsync()
    {
        DataList = new List<DataModel>();
        for (int i = 1; i <= 500; i++)
        {
            DataList.Add(new DataModel
            {
                Pos = i
            });
        }
    }

    public class DataModel
    {
        public int Pos { get; set; }
    }
}

 

0 comments