C#.NET - 在指定的单元格中插入图像 - DataGrid [英] C# .NET - Insert an Image in the specified cell - DataGrid
本文介绍了C#.NET - 在指定的单元格中插入图像 - DataGrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的应用程序中使用DataGridView。我需要将图像插入特定单元格[row,column]。我尝试了以下代码。
I'm using DataGridView in my application. I need to insert an image into the Particular cell [row,column].I have tried the following code.
Bitmap bMap = new Bitmap(@"D:\Images\image.jpg");
DataGridViewImageColumn dgv = new DataGridViewImageColumn();
dgv.Image = bMap;
dataGridView1.Columns.Insert(1,dgv);
推荐答案
www.aspdotnet-suresh.com/2011/01/how-to-insert-images-into- database-and.html?m = 1
www.aspdotnet-suresh.com/2011/01/how-to-insert-images-into-database-and.html?m=1
您好,
此链接可以帮助您
http://csharp.net-informations.com/datagridview/csharp-datagridview-image.htm [ ^ ]
Happy Coding
Hi,
This link may help you
http://csharp.net-informations.com/datagridview/csharp-datagridview-image.htm[^]
Happy Coding
这篇关于C#.NET - 在指定的单元格中插入图像 - DataGrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文