Forum


07:12

23/07/2009

Hi,
I suspect that adding dynamic images to a cell is currently not possible , at least I certainly haven't seen an example of it in the forums. What I mean by dynamic images is that I have image data stored in a database that I would like to render in a column of the grid. Using ASP.NET MVC its very easy to write the server side code that retrieves the image from the database. But how can I use jqgrid/jquery to convert that "binary" data and de-serialize it as an image. At no point does it exist as a file, (I realise I could use server side code to extract and save each image blob to a file on the server and then retrieve the file but thats not a path I want to go down. Any thoughts ?
Regards,
Simon
15:33

16/09/2009

I've done this by embedding an img tag in the cell contents. The src attribute can point to any url you want. It can be "dynamic" as long as the server code that processes it sends the right response headers and content. The only issue I have is that if the cell is editable, it puts the entire HTML in the textbox when I go into edit mode. Here's some sample HTML for the image cell.
Most Users Ever Online: 715
Currently Online:
52 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66