-2
I have a grid that displays some fields, this way:
<table id="listaNotas"
lider-data-table="@Html.Raw(Json.Encode(Model)).ToHtmlString()"
class="table-striped">
<thead>
<tr>
<th data-field="DataCriacao" data-sortable="true" data-formatter="dateTimeFormatter">@Html.DisplayNameFor(model => model.DataCriacao)</th>
<th data-field="Funcionario.Nome" data-sortable="true">@Html.DisplayNameFor(model => model.FuncionarioCadastro)</th>
<th data-field="Descricao" style="cursor:pointer" data-sortable="true">@Html.DisplayNameFor(model => model.Descricao)</th>
<th data-field="NotaId"
data-align="center"
data-formatter="actionFormatter"
data-events="actionEvents"
data-editar-action="@Url.Action("Editar", "Nota")"
data-excluir-action="@Url.Action("Excluir", "Nota")">Ações</th>
</tr>
</thead>
<tbody></tbody>
</table>
I am trying to do that when the user clicks on the Description text (not on the title, on the content (@Html.Displaynamefor(model => model. Description)), open a window (modal? container? ) that displays this Full description.
I created this window like this:
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Descrição</h4>
</div>
<div class="modal-body">
@Html.DisplayNameFor(model => model.Descricao)
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
</div>
</div>
</div>
</div>
How do I when the user clicks on the description, open this window?