Welcome!
This community is for professionals and enthusiasts of the Genio platform.
Share your questions and challenges, and help your partners!
Replace text with images in lists
Is there a way to use images instead of text in lists?
I would like to represent certain options with images.
Hello José,
There several ways to acomplish this, i’ll decribe two
methods (one manual and one only with Genio):
1 – With manual code:
In the manual code, add an entry with the following definition:
Platform: MVC
Type: CUSTOM_COLUMN
Module: “your module” our “system”
Parameters: the syntax is the module name followed by “MENU” and then the ID or the menu ID and finnaly the table and field name.
In the code you can make the evaluation and use one or more images.
//Created by [ BPM ] at [ 2017.09.13 ]
column.Format<object>((item) =>
{
if (@CSGenio.business.GlobalFunctions.emptyL((item as GenioMVC.Models.Pdfo1).ValTudoforn) == 0)
return Html.Raw("<img data-toggle='tooltip' title='Tooltip' src='" + Url.Content("~/content/img/green.png'"));
else
return Html.Raw("<img data-toggle='tooltip' title='Tooltip' src='" + Url.Content("~/content/img/red.png'"));
}).Title(@Resources.RECECIONADA_42385);
2 – With Genio only:
If the
text is a related table in the list, you can create a field for na image in
that table, then you can add na image to that specific record:
Now instead of using a text in the list, use de image instead:
Thank you for your question!
Keep Informed
About the Community
Question tools
Stats
Asked: 16/05/2019 10:43 |
Seen: 1397 times |
Last updated: 26/09/2019 17:03 |