title: Display Row Number with Blazor Virtualize Component
body: <p>I am using the <a href="https://docs.microsoft.com/en-us/aspnet/core/blazor/components/virtualization?view=aspnetcore-5.0" rel="nofollow noreferrer">Blazor virtualize component</a> with asp.net core 5.x to display a grid of data. I want to display the row number. I am not sure if this component supports this functionality.</p>
  <pre><code>Item Name  
  1    Fred  
  2    Bob  
  3    Craig
  </code></pre>
  <p>I tried adding a <code>coutner</code> variable but this did not work. The variable is alway 0.</p>
  <pre><code> &lt;Virtualize Context=&quot;donationRequest&quot; ItemsProvider=&quot;@LoadRequests&quot;&gt;
          &lt;ItemContent&gt;
              @Counter++
              &lt;tr&gt;
                  &lt;td&gt;
                      @Counter
                  &lt;/td&gt;
                  &lt;td&gt;
                      donationRequest.Name
                  &lt;/td&gt;
          &lt;/ItemContent&gt;
          &lt;Placeholder&gt;
              &lt;p&gt;
                  Loading...
              &lt;/p&gt;
          &lt;/Placeholder&gt;
      &lt;/Virtualize&gt;
  </code></pre>