473,399 Members | 3,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Inserting an image file in a datagrid view column- how

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
Jan 5 '06 #1
2 2262
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/is...A/default.aspx

Not sure it will help.

Greg
"Bob" <bd*****@sgiims.com> wrote in message
news:eX*************@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

Jan 5 '06 #2
Bob
HI greg, thanks for your reply.
the link is
http://msdn.microsoft.com/library/de...tml/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
"Greg Burns" <bl*******@newsgroups.nospam> wrote in message
news:%2******************@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/is...A/default.aspx

Not sure it will help.

Greg
"Bob" <bd*****@sgiims.com> wrote in message
news:eX*************@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


Jan 5 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ashish Shridharan | last post by:
Hi All I have been trying to add a control to the header cell of a datagrid on my ASP.NET page. These controls are defined in the HTML as ASP.NET web controls. They are being added into the...
2
by: Frederik | last post by:
Hi all, Situation: Windows Forms, DataGrid, CSharp, WinXP Pro, VS 2003 How can I add a click event to an Image? The Imageis in a DataGrid, drawn with the 'DrawImage' mehtod. The Image does...
0
by: a | last post by:
I've read and split a delimited text file into a dataset. It looks fine in a datagrid (5 columns and 5,000 rows), but I've been trying, without success, to then insert the resulting dataset called...
2
by: a | last post by:
NEW Post Here's my best guess at how to insert this dataset.... the code runs, but no new records are added to the sql table. I've read and split a delimited text file into a dataset. It...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
1
by: Jim Hammond | last post by:
The code below implements two datagrid columns that display images. The first column is just a test that always displays the same image directly from a file. The second column pulls the image from...
3
by: Simon Harris | last post by:
Hi All, I have a data grid which displays country names. I now wish to display the country flag images above the names. Can someone please advise how I display an image in a datagrid? I have a...
13
by: Neo Geshel | last post by:
I have examined about 80+ different upload scripts on the 'net, both in VB and C#, and none seem to do what I need them to do. Perhaps someone here can point me somewhere that Google hasn't...
1
by: ing42 | last post by:
I have a problem with inserting records into table when an indexed view is based on it. Table has text field (without it there is no problem, but I need it). Here is a sample code: USE test GO...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.