0
我正在填充一个简单的DataGridView
(griVerifiche
),其中一些值来自我的对象vBuilder。DataGridView从DataGridViewRowCollection填充
我想不通为什么值不显示在网格中(如果我调试我可以看到,行有一个值)
DataGridViewRowCollection tmpRowCollection = vBuilder.getDataGridFromExcel().Rows;
foreach(DataGridViewRow tmpRow in tmpRowCollection) {
DataGridViewRow rowClone = (DataGridViewRow)tmpRow.Clone();
griVerifiche.Rows.Add(rowClone);
int intColIndex = 0;
//Looping each column to fill the grid
foreach (DataGridViewCell cell in tmpRow.Cells)
{
griVerifiche.Rows[griVerifiche.Rows.Count - 1].Cells[intColIndex].Value = cell.Value;
intColIndex++;
}
}
griVerifiche.Refresh();
你可以请张贴你的ASPX标记。 –
这是c#...没有aspx输出,反正网格在设计器中没有列(列添加dinamically) – VAShhh
这是一个Web应用程序或Windows应用程序? –