Code to bind image in datagrid columns

M

Mike

I would like to view some sample code of how to bind an
image to the data fields in a datagrid. I would like to
do this programatically and with different images for
each row in the same column.

If you don't have the code, please point me to another
resource.

Thank you for your time.
 
J

John

There are dozens of ways to do this. If you have the image filenames in the
database, you can do it the lazy way, right in the sql phrase:

select colname1 as a, colname2 as b, '<img src=' + colname3 + '>' as c,
colname4 as d from tablename

Substitute the desired grid column headers for a,b,c and d above. No spaces
in the column header names in this variation.

John
http://mllsocket.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top