Hello.
I have two questions concerning the filtration and the grid template.
First, is it possible to have the filtration icon when the content of a column is filled via the Template.
Secondly, is it possible to make a filter on the label due <a> and not on the content of the rel='nofollow' href?
Below is the code I use to generate my table.
@if (Model.ListeAllDossiers.Count > 0)
{
@Html.EJS().Grid("FilterMenu").DataSource(@Model.ListeAllDossiers).AllowFiltering().AllowSorting().Columns(col =>
{
col.HeaderText("File").Template("#templateAdmin").Width("120").TextAlign(TextAlign.Left).Add();
col.HeaderText("People 1").Template("#templatePeople1").Width("120").TextAlign(TextAlign.Left).Add();
col.HeaderText("People 2").Template("#templatePeople2").Width("120").TextAlign(TextAlign.Left).Add();
col.Field("CreatedDate").HeaderText("Created").Width("150").TextAlign(TextAlign.Left).Add();
}).AllowPaging(true).PageSettings(page => page.PageSize(10)).FilterSettings(filter => { filter.Type(FilterType.Excel); }).Render()
}
<script id="templateAdmin" type="text/x-template">
${if(IsDossierPremium)}
<a rel='nofollow' href="/Admin/Proc?idFolder=${IdSyncFolder}">${IdSyncFolder}</a>
${else}
${IdSyncFolder}
${/if}
</script>
<script id="templatePeople1" type="text/x-template">
${if(IsDossierPremium)}
<a rel='nofollow' href="/FolderPeople/Proc?idFolder=${IdSyncFolder}&idEpoux=${IdPremierEpoux}">${IdPeople1}</a>
${else}
<a rel='nofollow' href="/FolderPeople/Lancement?idFolder=${IdSyncFolder}&idEpoux=${IdPremierEpoux}">${IdPeople1}</a>
${/if}
</script>
<script id="templatePeople2" type="text/x-template">
${if(IsDossierPremium)}
<a rel='nofollow' href="/FolderPeople/Proc?idFolder=${IdSyncFolder}&idEpoux=${IdSecondEpoux}">${IdPeople2}</a>
${else}
<a rel='nofollow' href="/FolderPeople/Lancement?idFolder=${IdSyncFolder}&idEpoux=${IdSecondEpoux}">${IdPeople2}</a>
${/if}
</script>
Thanks in advance for the answers.
Hello
Thanks for the example and the answer provided it works correctly now.
Quentin