Hello,
I need to download a file when I press a button in a grid. The file is retrieved via a webservice and I would like this to be done server side.
Below is the code I wrote, the problem is that when I post by pressing the button the grid empties.
can you help me?
Thanks
<ejs-grid id="Grid" dataSource="@Model.documenti" allowFiltering="true" allowPaging="true" allowGrouping="true" toolbar="@(new List<string>() {"Search" })">
<e-grid-filtersettings type="Excel"></e-grid-filtersettings>
<e-grid-pagesettings pageCount="5"></e-grid-pagesettings>
<e-grid-groupSettings showDropArea="false" captionTemplate="#captiontemplate" columns="@(new string[] { "DESCR_TIPO_DOC_DGT"})"></e-grid-groupSettings>
<e-grid-columns>
<e-grid-column field="DESCR_TIPO_DOC_DGT" headerText="ANNO"></e-grid-column>
<e-grid-column field="R_ANNO_DOC" headerText="ANNO"></e-grid-column>
<e-grid-column field="DATA_DOC" headerText="DATA" format="yMd"></e-grid-column>
<e-grid-column field="R_NUMERO_DOC" headerText="NUM.DOC."></e-grid-column>
<e-grid-column headerText="AZIONI" template="#azioniTemplate"></e-grid-column>
</e-grid-columns>
</ejs-grid>
<script id="captiontemplate" type="text/x-template">
${key}
</script>
<script id="azioniTemplate" type="text/x-template">
<form method="POST">
<a rel='nofollow' href="@Url.Page("DocDgt", "DownloadFile", new { fileName = "file.pdf" })">Download</a>
</form>
</script>