Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/319.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 是否为图像列设置默认图像?_C#_Winforms_Telerik_Radgridview - Fatal编程技术网

C# 是否为图像列设置默认图像?

C# 是否为图像列设置默认图像?,c#,winforms,telerik,radgridview,C#,Winforms,Telerik,Radgridview,有RadGridView其中有ImageColumn如何设置此列的默认图像? 我正在使用 private void setImageToColumns() { foreach (var row in dgv_AddJournal.Rows) { row.Cells["SearchAccount"].Value = Accounting.Genral.Properties.Resources._1396284460_system_

RadGridView
其中有
ImageColumn
如何设置此
列的默认图像?
我正在使用

  private void setImageToColumns()
    {
        foreach (var row in dgv_AddJournal.Rows)
        {
            row.Cells["SearchAccount"].Value = Accounting.Genral.Properties.Resources._1396284460_system_search; 
            row.Cells["SearchCostCenter"].Value = Accounting.Genral.Properties.Resources._1396284460_system_search;
            row.Cells["DeleteAccount"].Value = Accounting.Genral.Properties.Resources._1398281700_Gnome_Edit_Clear_64;
            row.Cells["DeleteCost"].Value = Accounting.Genral.Properties.Resources._1398281700_Gnome_Edit_Clear_64;

        }
    }
我在
PageLoad
UserAddingRow
事件中调用此方法及其工作原理
有一种不使用代码设置默认图像的方法吗?

Mohamed在初始化datagrid时尝试一下,因为您应该有两件事 1-伪造行,以便您可以添加和自定义它,它将被锁定 2-检查方法,以便在(添加、编辑、删除…等)时跳过空行


我通过添加

dgv_AddJournal.CurrentRow.Cells["SearchAccount"].Value = Accounting.Genral.Properties.Resources._1396284460_system_search; 
            dgv_AddJournal.CurrentRow.Cells["SearchCostCenter"].Value = Accounting.Genral.Properties.Resources._1396284460_system_search;
            dgv_AddJournal.CurrentRow.Cells["DeleteAccount"].Value = Accounting.Genral.Properties.Resources._1398281700_Gnome_Edit_Clear_64;
            dgv_AddJournal.CurrentRow.Cells["DeleteCost"].Value = Accounting.Genral.Properties.Resources._1398281700_Gnome_Edit_Clear_64;
页面内加载

dgv_AddJournal.CurrentRow.Cells["SearchAccount"].Value = Accounting.Genral.Properties.Resources._1396284460_system_search; 
            dgv_AddJournal.CurrentRow.Cells["SearchCostCenter"].Value = Accounting.Genral.Properties.Resources._1396284460_system_search;
            dgv_AddJournal.CurrentRow.Cells["DeleteAccount"].Value = Accounting.Genral.Properties.Resources._1398281700_Gnome_Edit_Clear_64;
            dgv_AddJournal.CurrentRow.Cells["DeleteCost"].Value = Accounting.Genral.Properties.Resources._1398281700_Gnome_Edit_Clear_64;