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

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top