title: Blazor - button to Select items from a table and insert them in another table
body: <p>i Have a table with all my items:</p>
  <pre><code>&lt;div class=&quot;container&quot;&gt;
      &lt;div class=&quot;row bg-light&quot;&gt;
          &lt;table class=&quot;table table-bordered&quot;&gt;
              &lt;thead class=&quot;thead-green&quot;&gt;
                  &lt;tr&gt;
                      &lt;th&gt;Update&lt;/th&gt;
                      &lt;th&gt;SQLite ID&lt;/th&gt;
                      &lt;th&gt;Variable Name&lt;/th&gt;
                      &lt;th&gt;Value&lt;/th&gt;
                      &lt;th&gt;Description&lt;/th&gt;
                      &lt;th&gt;Delete Variable&lt;/th&gt;
                  &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                  @if (Products.Any())
                  {
                      @foreach (var product in Products)
                      {
                          &lt;tr @onclick=&quot;(() =&gt; SetProductForUpdate(product))&quot;&gt;
                              &lt;td&gt;&lt;button style=&quot;background-color:green;&quot; class=&quot;btn btn-primary btn-medium&quot; onClick=&quot;document.getElementById('UpdateSystemValues').scrollIntoView();&quot;&gt;Select&lt;/button&gt;&lt;/td&gt;
                              &lt;td&gt;@product.Id&lt;/td&gt;
                              &lt;td&gt;@product.Name&lt;/td&gt;
                              &lt;td&gt;@product.Price&lt;/td&gt;
                              &lt;td&gt;@product.Description&lt;/td&gt;
                              &lt;td&gt;&lt;button class=&quot;btn btn-danger&quot; @onclick=&quot;(() =&gt; DeleteProduct(product))&quot;&gt;Delete&lt;/button&gt;&lt;/td&gt;
  
                          &lt;/tr&gt;
                      }
                  }
                  else
                  {
                      &lt;tr&gt;&lt;td colspan=&quot;6&quot;&gt;&lt;strong&gt;No products available&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
                  }
              &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I need the Select button to add the item to a new table. Each time I select an item, a new row should be created including the selected item.</p>