DataGrid to have Record Number on the first column

I could not find the way to show record number on DataGrid

The first column in this demo shows exactly what you are after:

1 Like

Got it.

Need to use IList
then @(orders.IndexOf(context) + 1)

Thanks a lot!

Is it possible for combination Primary Key won't work?

Encounter a problem, inMstsList.IndexOf(context) not working

At the same time, the other 2 grids are very ok!

You can display anything in the column template including the primary key.

Problem here is application could not locate this object by using IndexOf in this case.
Any advice to do debug?

Maybe you should not create new List in the property getter.

Still not working

Using the code generated by Radzen

Thanks again for you advice!
Not to use generated code, there's something I don't fully understand yet.

However to use simple EF Core style. It works well, including grid filter/sort.

Your issue are not related to Radzen or Radzen Blazor components. As I said in my previous reply you should not create new List every time property getter is touched.