|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Inserting an image file in a datagrid view column- howI 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 Do you have a link to that Jan '05 article? Having trouble finding it.
I found this in the Jan '06 issue... (see last Q&A) http://msdn.microsoft.com/msdnmag/issues/06/01/DevQA/default.aspx Not sure it will help. Greg Show quoteHide quote "Bob" <bduf***@sgiims.com> wrote in message news:eXDnFvjEGHA.376@TK2MSFTNGP12.phx.gbl... >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 > > 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 Show quoteHide quote "Greg Burns" <bluebunny@newsgroups.nospam> wrote in message news:%23f7k0%23jEGHA.2040@TK2MSFTNGP14.phx.gbl... > Do you have a link to that Jan '05 article? Having trouble finding it. > > I found this in the Jan '06 issue... (see last Q&A) > > http://msdn.microsoft.com/msdnmag/issues/06/01/DevQA/default.aspx > > Not sure it will help. > > Greg > > > "Bob" <bduf***@sgiims.com> wrote in message > news:eXDnFvjEGHA.376@TK2MSFTNGP12.phx.gbl... >>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 >> >> > > |
|||||||||||||||||||||||