How to change the Model data being shown in Gridmvc?

Asked

Viewed 25 times

0

I have a Gridmvc in my form where displays a list of units, in this grid has a text field, and a checkbox, I would like when the user type some text box or catch the check, this change reflected in the model.

View:

     <b>Selecione as Unidades</b><div class="code-cut">
        @Html.Grid(Model).Columns(Columns =>
   {
       Columns.Add()
                .Encoded(false)
                .Sanitized(false)
                .SetWidth(30)
                .RenderValueAs(o => Html.CheckBox("Selecionado", o.Selecionado));
       Columns.Add(c => c.IdUnidadeSAP).Titled("ID Unidade SAP").Filterable(true);
       Columns.Add(c => c.Codigo).Titled("ID Unidade Legado").Filterable(true);
       Columns.Add(c => c.Descricao).Titled("Desc. Unidade").Filterable(true);
       Columns.Add(c => c.CodPrestadorSAP).Titled("Cod. Prestador SAP").Filterable(true);
       Columns.Add()
       .Encoded(false)
       .Sanitized(false)
       .SetWidth(30)
       .RenderValueAs(c => Html.TextBox("Cod. Prestador VAEL", c.TipoLogradouro));

   }).WithPaging(10).Sortable(true)
    </div>

Canvas:

Tela do grid

  • What does the component documentation say about this?

  • I couldn’t find anything there to help me

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.