I have a grid with images displayed based on paths included in the datasource. When clicking on the cell, I simply want to access the path value. I've attempted several ways to accomplish this and found a few samples in the forums. However, I only seem to be able to return the field name and not the associated value. In the example below, if the second column (index 1) cell is selected, I am attempting to access the value from the hidden cell at the 0 index.
<ejs-grid id="Gridpic" allowtextwrap="true" allowSelection="true" dataSource="@ViewBag.datasourcepic" cellSelected="BigPic">
<e-grid-selectionsettings mode="Cell"></e-grid-selectionsettings>
<e-grid-textwrapsettings wrapmode="Header" />
<e-grid-columns>
<e-grid-column field="picpath" visible="false"></e-grid-column>
<e-grid-column template="#picTemplate"></e-grid-column>
<e-grid-column template="<img src='${picpath1}'>"></e-grid-column>
<e-grid-column template="<img src='${picpath2}'>"></e-grid-column>
<e-grid-column template="<img src='${picpath3}'>"></e-grid-column>
</e-grid-columns>
</ejs-grid>
<script type="text/x-jsrender" id="picTemplate">
<img src="${picpath}&thumb=t" />
</script>
<script type="text/javascript">
function BigPic(args)
{
var grid = document.getElementById("Gridpic").ej2_instances[0];
var field = grid.columns[args.cellIndex.cellIndex - 1].field;
location.rel='nofollow' href = field;
}