ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: dcalvo on September 03, 2015, 06:55:32 pm

Title: Image into a cell
Post by: dcalvo on September 03, 2015, 06:55:32 pm
This is my first post and my english is terrible. I´m sorry for that.

I have a grid that shows the user`s list of the system. For security reasons, I need to add a column with the Photo ID of user. There area a way to add an HTML img tag into a cell?
Title: Re: Image into a cell
Post by: paramvir on September 03, 2015, 07:37:00 pm
An img HTML tag can be added in column.render callback.

Assuming you have the src attributed saved in data field.

column.render = function( ui ){
  return "<img src = '" + ui.cellData + "' />"
}

Example for usage of img tag in column.render

http://paramquery.com/pro/demos/render_cells