Hi Rahul Salokhe,
If you just want add increment number to the grid, you could try following:
@page "/"
@using Microsoft.AspNetCore.Components.QuickGrid
<QuickGrid Items="items" RowsPerPage="10">
<TemplateColumn Title="Serial">@(count++)</TemplateColumn>
<PropertyColumn Property="@(item => item.Name)" Title="Name" />
</QuickGrid>
@code {
private int count= 1;
private IQueryable<Item> items= new[]
{
new Item { Name = "Tom" },
new Item { Name = "Kite" },
new Item { Name = "Jack" },
}.AsQueryable();
public class Item
{
public string Name { get; set; }
}
}
This way you could display a number without changing the entity.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.