Home All Groups Group Topic Archive Search About

Simple method of binding PictureBox Image to Datatable

Author
16 Apr 2006 7:58 PM
Joe Spears
Hi
Is there a simple way to bind a PictureBox image to a datatable??
I've tried
pictureBox.DataBindings.Add("BackgroundImage", dt1, "Picture");

But it doesn't seem to work.

Do I have to go to the trouble of creating memorystreams?? I thought there
was an easy way in VS 2005 / .Net 2.0



Thanks

Author
16 Apr 2006 10:57 PM
Kevin Spencer
You would have to reference an image that was stored in the DataTable *as*
an image. I'm guessing that "Picture" is the name of a DataColumn? What
exactly is stored in there? Pure binary data?

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

Show quote
"Joe Spears" <joespe***@hotmail.co.uk> wrote in message
news:glx0g.276277$zk4.164976@fe3.news.blueyonder.co.uk...
> Hi
> Is there a simple way to bind a PictureBox image to a datatable??
> I've tried
> pictureBox.DataBindings.Add("BackgroundImage", dt1, "Picture");
>
> But it doesn't seem to work.
>
> Do I have to go to the trouble of creating memorystreams?? I thought there
> was an easy way in VS 2005 / .Net 2.0
>
>
>
> Thanks
>
>

AddThis Social Bookmark Button