| | |
Regarding images in button column of datagridview
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2006
Posts: 436
Reputation:
Solved Threads: 72
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
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
•
•
Join Date: Dec 2007
Posts: 2
Reputation:
Solved Threads: 0
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.
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.
![]() |
Similar Threads
- Image in DataGridView (C#)
- Catching Dynamic Button Events (ASP.NET)
- date and time in file name (VB.NET)
- COMBOBOX VS DATAGRIDVIEW - resizing and positioning! (VB.NET)
- Need Critique on new Awards Site (Website Reviews)
- WebHostGear.com - Ad Space available. Buy one get one free 72h sale! (Ad Space for Sale)
- How to update a Datagrid cell in Javascript (C#)
- height: 100% - cannot get this to work (HTML and CSS)
Other Threads in the C# Forum
- Previous Thread: Problem with GridView
- Next Thread: Databinding problem
Views: 8945 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for C#
.net access ado.net algorithm array barchart bitmap box broadcast button c# chat check checkbox class client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file files form format forms ftp function gdi+ httpwebrequest image index input install java label list listbox listener login math mouseclick mysql networking object operator path photoshop picturebox pixelinversion post prime programming radians regex remote remoting resource save saving serialization server sleep socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml





