473,421 Members | 1,616 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,421 software developers and data experts.

How to change DataGridView ImageColumn's image file name ?

Hi all,
I use DataGridView in my form and add image column and 2 textbox column, and
I want to change image column's image on runtime. But there is no any
example on this function. What can I do ?

More thanks

Tommy
Nov 23 '05 #1
2 8642
Hi,

You would have to draw the image yourself in the cell paint event.

http://windowssdk.msdn.microsoft.com...llPainting.asp

Ken
--------------------
"Tommy" <to*****@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi all,
I use DataGridView in my form and add image column and 2 textbox column,
and
I want to change image column's image on runtime. But there is no any
example on this function. What can I do ?

More thanks

Tommy

Nov 23 '05 #2
Thanks your help first, but in my program it is click the button then
change the selected row's imagecolumn cell to another image files. but the
link sample is drawing by own. How can I change selected cell image file by
button.

More Thanks

Tommy
"Ken Tucker [MVP]" <vb***@bellsouth.net> ¼¶¼g©ó¶l¥ó·s»D:ue****************@TK2MSFTNGP12.phx .gbl...
Hi,

You would have to draw the image yourself in the cell paint event.

http://windowssdk.msdn.microsoft.com...llPainting.asp

Ken
--------------------
"Tommy" <to*****@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi all,
I use DataGridView in my form and add image column and 2 textbox column,
and
I want to change image column's image on runtime. But there is no any
example on this function. What can I do ?

More thanks

Tommy


Nov 23 '05 #3

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

Similar topics

2
by: hazz | last post by:
in a databound scenario I have a database column value that is of type varchar with 3 discrete text values. Binding to this table column with autogenerated columns displays the text values in a...
1
by: Luca Beretta | last post by:
I think this a simple question but i'm breaking my brain without results. I've a datagridview bounded to a datatable, with an imagecolumn that should contain a different bitmap depending from a...
2
by: Marc Solé | last post by:
Hello, I want to insert an image to a specific column of a dataGridWiew. I explain what I'm doing: - I define the ColumnType as a DataGridViewImageColumn. - I select the image (an icon of...
3
by: Prashwee | last post by:
Hello All In my windows application I am using DataGridView as my grid control. I populated let's say 10 rows of data and modified 3 random rows. I need to put some sort of Edit Marker in the...
0
by: giminera | last post by:
I've got a datagridview that is bound to a table "orders" of my db. There are 5 column: 4 textcolumn and 1 imagecolumn: code (textcolumn) search (imagecolumn) description (textcolumn) UM...
3
by: obrienkev | last post by:
Hi, I have an ImageColumn in my DataGridView. I have run a query to return 'myCmtPosID' from 'myComments' table. I then want to check if 'myCmtPosID' matches with 'myPosID'. 'myPosID' is a...
3
by: Screaming Eagles 101 | last post by:
Hi, is there an easy way to add a picture(box) to a column in a datagridview ? My first column has a code, ex. 1, 2 or 3 According to these codes I'dd like to add a picture(box) to my second...
0
by: lucoin | last post by:
as add imagecolumn to the datagridview which contains the photo path. the problem I have to click the button twice, then the picture comes. the code as follows. Dim ds As DataSet ...
3
by: Stewart Berman | last post by:
I have an application that populates a DataGridView control with an XML file: private void Form1_Load(object sender, EventArgs e) { dataGridView1.DataSource = gridDataSet;...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
1
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.