Kendo UI Grid - Show row number
问题 How do I show the row number in a Kendo UI Grid? The code I have is not working. The page displays the column but it's empty. @{int counter = 1;} @(Html.Kendo().Grid<QueueViewModel>() .Name("Queue") .Columns(columns => { columns.Template(@<text><span>@counter @{ counter++; }</span></text>).Title("#"); }) .DataSource(dataSource => dataSource .Ajax() .PageSize(10) .Read(read => read.Action("GetOpenQueue", "DataSource", new { GeneralQueue = true }) )) 回答1: Do this: @{ int counter = 1; } @(Html