I'm using MVC in my application and in Views I'm using various Telerik tools.
I need to get some information from a POST that I give to my View .
Follow View:
<div class="div-grid">
@using (Html.BeginForm("ExecutaExportacao", "ExportacaoFinal"))
{
@(Html.Telerik().Grid(listRateioFinal)
.Name("Grid")
.Columns(columns =>
{
columns.Template(
@<text>
<input name="checkedCli" type="checkbox" value="@item.Row.ItemArray[1].ToString()" title="checkedCli" />
</text>).Title("").Width(10).HtmlAttributes(new { style = "text-align:center" });
columns.Bound(o => o.Row.ItemArray[0]).Width(100).Title("ANO MES");
columns.Bound(o => o.Row.ItemArray[1]).Width(100).Title("ID_CLI");
columns.Bound(o => o.Row.ItemArray[2]).Width(100).Title("VALOR");
})
.Scrollable())
<input type="submit" value="Exportar Arquivo"/>
}
</div>
Follow Controller:
[HttpPost]
public ActionResult ExecutaExportacao(int[] checkedCli)
{
ExportarArquivo(anoMes);
return RedirectToAction("Index");
}
With this code I get the values of the checkedCli array, but I would also like to get the values from the YEAR MONTH column of the Grid. I can not particularly explain why checkedCli data collection works, I suppose it is the name attribute that references POST, indicating that it is the checkedCli from Controller.
How do I also get the values from the YEAR MONTH column?