How to show Image in a list item of view in K2 Applications?

794 Views Asked by At

How have a list view where I need to show a image in column of the list view. I have changed the column datatype as Image. Still I Was unable to see the Image. I am using SQL as a Database.

2

There are 2 best solutions below

0
On

You can try the following:

  1. store image in a database as Base64 encoded string
  2. create an expression that would render it as image (using HTML IMG tag)
  3. As the final step, you need to add an unbound column to your ListView and use the expression you created in step 2 to render your image in that particular column.
0
On

If you using a regular symbol to show in the list, You can use the UNICODE of the symbol to store it in the SQL table. While the list view retrieve it from the database it will automatically convert it into the actual character or Symbol.

In order to show the Image, You can store the Image in the K2 Blackpearl server -> Runtime folder path. Then copy the URL of the Image and store in the SQL Table. While list view is initialising, the Image URL Runtime will also get initialised and image will be replaced in the place of URL.