User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 456,520 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,821 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser: Programming Forums
Views: 4412 | Replies: 2
Reply
Join Date: Aug 2006
Posts: 57
Reputation: Exelio is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Exelio Exelio is offline Offline
Junior Poster in Training

Question Regarding images in button column of datagridview

  #1  
Oct 3rd, 2007
hi all.

Is it possible to display an image in all buttons in a
datagridview(Windows Forms) button column? if yes,

can you help me how to do it?

Thank you,

Regards

Exelio
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2006
Location: Bonners Ferry, ID
Posts: 280
Reputation: JerryShaw is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 39
JerryShaw JerryShaw is offline Offline
Posting Whiz in Training

Re: Regarding images in button column of datagridview

  #2  
Oct 10th, 2007
Are you speaking of the Header cells, or a data cell ?

I havn't tried it on tried it on the header, however I am pretty sure it can be done.
If you are speaking of data cells, you can use the
CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)

CellFormatting event to set the e.Value to an image.

//Jerry
Reply With Quote  
Join Date: Dec 2007
Posts: 2
Reputation: Kisankoori is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Kisankoori Kisankoori is offline Offline
Newbie Poster

Re: Regarding images in button column of datagridview

  #3  
Dec 14th, 2007
Hi Exelio,

Yes I think it is possible. Just click on the gridview and click edit columns and then select the particular cell which you wanted to make a button and then in the Bound Column properties Window choose Column type under the design and select DataGridViewImageColumn for the columnType which you want the image to appear on. Then under the Appearance in the Bound Column properties you see the image text on the left side. just click on the right side infront of image text, then a window will pop up from there you can select your image. It should appear on all the buttons in the gridview.

Hope this helps

Cheers

Kisankoori.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C# Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C# Forum

All times are GMT -4. The time now is 4:11 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC