row selected by default first in an HTML5 table

0

Hello, I have an html table that I fill from a model and when I click on the row I load some data in a form, I need that when I click on the row I always leave by default selected at the top of the table

<table id="tabla" class="table table-bordered">
    <thead>
    </thead>
    <tbody>
      @foreach (var item in Model.ListaInstervenciones)
      {
        <tr>
            @if (item.IdIntervencion == Convert.ToInt32(Request.QueryString["idIntervencionSe"]))
               {
                 <td class="bg-info">
                  <div class="nav">
                   @Html.DisplayFor(modelItem => item.Numero)
                   -
                   @Html.DisplayFor(modelItem => item.Asunto)
                   <div class="pull-right">
                   @Html.ActionLink(" ", "SeguimientoIntervencion", new
                     {
                       idIntervencionSe = item.IdIntervencion
                     }, new
                     {
                       @class = "fa fa-chevron-circle-right fa-lg",
                       title = "Cargar Seguimientos de la intervención",
                       @style = "color: #ffffff;"
                     })
                   </div>
                 </div>
                 </td>
                }
                else
                {
                  <td class="nav">
                   <a href='@Url.Action( "SeguimientoIntervencion", new {idIntervencionSe = item.IdIntervencion })'>
                    @Html.DisplayFor(modelItem => item.Numero)
                    -
                    @Html.DisplayFor(modelItem => item.Asunto)

                    <div class="pull-right">
                      @Html.ActionLink(" ", "SeguimientoIntervencion", new
                       {
                         idIntervencionSe = item.IdIntervencion
                       }, new
                       {
                       @class = "fa fa-chevron-circle-right fa-lg",
                       title = "Cargar seguimientos de la intervención"
                       })
                     </div>
                    </a>
                   </td>
                 }

           </tr>
         }
    </tbody>
</table>
    
asked by Juan C. Martinez 25.07.2018 в 22:48
source

0 answers