Hi Scarpello,
Thanks for contacting Syncfusion support.
We have analyzed your query and we found that you want add the images in column based on the result in grid. So we suggest you to template property of the grid columns to achieve your requirement.
Please refer the following code example:
|
<ej-grid id="Grid" datasource=ViewBag.parent allow-paging="true" >
.....
<e-columns>
<e-column header-text="Images" template="#columnTemplate"></e-column>
</e-columns>
</ej-grid>
<script type="text/x-jsrender" id="columnTemplate">
{{if EmployeeID < 5}}
<img src="/css/ej/web/bootstrap-theme/images/checkedtick.png"/>
{{else}}
<img src="/css/ej/web/bootstrap-theme/images/waitingpopup.gif"/>
{{/if}}
</script> |
In this code we have used template column. Before render the template we have checked the condition based on the EmployeeID value. If EmployeeID value is less than 5 then its render one image, otherwise render another one image. Also we have prepared the sample with your requirement and that sample can be downloadable from the below link,
Please refer the following link to know about column template:
If you need further assistance please get back to us,
Regards,
Kuralarasan M.