Inserting an image file in a datagrid view column- how

B

Bob

I looked at the sample in the msdn january 2005 - Introducing a new
datagrid, but the project downloaded failed to open.

Any one can point me to a bit of code on how to go and select an image that
will get put in the datagridview. The column is bound to a sql server 2005
image data field. I just need to know how to put the image in the column.

Any help appreciated.

Bob
 
B

Bob

HI greg, thanks for your reply.
the link is
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvsdev05/html/vs05a9.asp

I think I'm on the right track by doing the following
I added a ContectMenuStrip that I assigned to my image column in the
datagrid view
A click on the contextmenu strip item opens a file dialog that allows user
to find a bmp or jpg file (I,m not yet sure if I should limit it to bmp
only - that comes up with the reporting engine for printing later.
then there's the FileOK event of the dialog. I think that fires if you
selected a file and clicked OK.

I should then be able to open the selected file, I suspect that I would have
to open it to a stream reader and assign the stream to the value of the
selected cell.. Now that becomes the question, how to do that bit of code.

May be there's a simpler way. After all this is supposed to be RAD
development isn't it ;-)

Thanks for your help
 

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

Top