This question is locked. New answers and comments are not allowed.
I have my grid in a partial view, like this:
and I have a ajax form in the index view like this:
Question:
In the partial view, how can I call the controller function "_Pesquisar" passing the form parameters?
@model System.Data.DataTable@(Html.Telerik().Grid(Model) .Name("Grid") .DataBinding(dataBinding => dataBinding.Ajax().Select("_Pesquisar", "Prestador")) .HtmlAttributes(new { @class = "grid-padrao" }) .ClientEvents(events => events .OnDataBound("atualizarCss") ) .Columns(columns => { columns.Template( @<span><a href="/carencia/" image="show" class="formatacao"></a> <a href="/carencia/" image="delete" class="formatacao"></a> </span> ) .ClientTemplate("<span><a href='/carencia/' image='show' class='formatacao'></a>" + "<a href='/carencia/' image='delete' class='formatacao'></a>" + "</span>") .Width(76); columns.Bound("Nome").Title("Nome"); columns.Bound("Logradouro").Title("Logradouro"); }) .Pageable() .Sortable() )and I have a ajax form in the index view like this:
@using (Ajax.BeginForm( "Pesquisar", "Prestador", new AjaxOptions { HttpMethod="POST", InsertionMode = InsertionMode.Replace, UpdateTargetId = "gridPesquisa", OnSuccess = "atualizarCss" } )){ <fieldset> <div class="editor-label"> @Html.LabelFor(model => model.Nome) </div> <div class="editor-field"> @Html.EditorFor(model => model.Nome) @Html.ValidationMessageFor(model => model.Nome) </div>Question:
In the partial view, how can I call the controller function "_Pesquisar" passing the form parameters?