protected void GVRebate_DataBound(object sender, EventArgs e)
{
for (int i = 0; i < GVRebate.Rows.Count - 1; i++)
{
for (int j = 1; j < GVRebate.Columns.Count - 1; j++)
{
GVRebate.Rows[i].Cells[j].Text = "1";
}
}
}
为什么用了这段代码GridView单元格的值都是空
{
for (int i = 0; i < GVRebate.Rows.Count - 1; i++)
{
for (int j = 1; j < GVRebate.Columns.Count - 1; j++)
{
GVRebate.Rows[i].Cells[j].Text = "1";
}
}
}
为什么用了这段代码GridView单元格的值都是空
第一列的数据绑定好了
第2到第13列是12个月份
有的行有数据,有的行没有数据
怎么才能让没有数据的行的单元格内容为NULL?