Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Adding dynamic images to cells
09/09/2009
07:12
Avatar
SimonL
Member
Members
Forum Posts: 39
Member Since:
23/07/2009
sp_UserOfflineSmall Offline

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

09/09/2009
21:41
Avatar
MamaliFrenchi
Member
Members
Forum Posts: 62
Member Since:
22/12/2008
sp_UserOfflineSmall Offline

you can always post from jqGrid to a HttpHandler to render all kind of images format.

16/09/2009
15:33
Avatar
scottw512
Member
Members
Forum Posts: 9
Member Since:
16/09/2009
sp_UserOfflineSmall Offline

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.

<div style="float: left;">test img</div>
<div style="padding-top: 2px; float: right;">
<img height="12" width="12" src="/images/web/001_06.png"/>
</div>
23/09/2009
09:01
Avatar
SimonL
Member
Members
Forum Posts: 39
Member Since:
23/07/2009
sp_UserOfflineSmall Offline

Guys (MamaliFrenchi and scottw512),

Thank you very much both of you for your replies. The combination of these 2 posts put me on the right track and I now have images being delivered directly from my backend database and appearing in the grid.

Thanks again,

Simon

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information