943,877 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 8135
  • VB.NET RSS
Sep 20th, 2007
0

Displaying images in datagrid in VB.net

Expand Post »
Can any one please tell me how to retrieve image that i have stored in SQL SERVER 2000 and display the image in datagrid in VB.net 2003? I am able to display text data in datagrid but the picture cannot be display (in datagrid the picture is not shown but it display byte[]).

Any help will be appreciated. Thank you.
Similar Threads
Pja
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Pja is offline Offline
12 posts
since Sep 2007
Sep 20th, 2007
0

Re: Displaying images in datagrid in VB.net

Are you storing the path of the image in SQL or the actual image?
Reputation Points: 25
Solved Threads: 18
Practically a Master Poster
binoj_daniel is offline Offline
645 posts
since Dec 2006
Sep 20th, 2007
1

Re: Displaying images in datagrid in VB.net

In .NET 2003 there is no built in column style for images, you will need to implement one yourself by deriving from DataGridColumnStyle. You have to implement the ExtractImageFromOleContainer() method of the DataGridImageClass.

If you need more help I can write a demo app. for you.
Reputation Points: 25
Solved Threads: 18
Practically a Master Poster
binoj_daniel is offline Offline
645 posts
since Dec 2006
Sep 21st, 2007
0

Re: Displaying images in datagrid in VB.net

So did you get any luck using my suggestion?
Reputation Points: 25
Solved Threads: 18
Practically a Master Poster
binoj_daniel is offline Offline
645 posts
since Dec 2006
Sep 21st, 2007
0

Re: Displaying images in datagrid in VB.net

I have a table named Tool in SQL Server 2000 with 4 columns:
Tool_id
Tool_size
ToolImage - datatype Image ( which i store the actual image eg drill.jpg)
ImagePath - datatype varchar (which i store the image path eg D:\My Pictures\drill.jpg)

I'll be glad if you can tell me how to implement the ExtractImageFromOleContainer() method of the DataGridImageClass step by step or perhaps a demo app like you had offer.

Just for your information, im a beginner in VB.net programming.
Pja
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Pja is offline Offline
12 posts
since Sep 2007
Sep 21st, 2007
0

Re: Displaying images in datagrid in VB.net

I have a table named Tool in SQL Server 2000 with 4 columns:
Tool_id
Tool_size
ToolImage - datatype Image ( which i store the actual image eg drill.jpg)
ImagePath - datatype varchar (which i store the image path eg D:\My Pictures\drill.jpg)

I'll be glad if you can tell me how to implement the ExtractImageFromOleContainer() method of the DataGridImageClass step by step or perhaps a demo app like you had offer.

Just for your information, im a beginner in VB.net programming.
Pja
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Pja is offline Offline
12 posts
since Sep 2007
Sep 21st, 2007
0

Re: Displaying images in datagrid in VB.net

I will try to create a sample app using your table Format.
Reputation Points: 25
Solved Threads: 18
Practically a Master Poster
binoj_daniel is offline Offline
645 posts
since Dec 2006
Sep 23rd, 2007
0

Re: Displaying images in datagrid in VB.net

thanks
Pja
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Pja is offline Offline
12 posts
since Sep 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Switch focus to new form
Next Thread in VB.NET Forum Timeline: can anyone help about how to load form on lcd module thru parallel port?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC