【发布时间】:2013-11-26 12:28:54
【问题描述】:
当gridview在编辑模式下点击外部按钮时如何获取boundcolumn的新值(编辑模式下的默认文本框)。
if (grdMappingLog.HeaderRow != null)
{
for (int i = 0; i < grdMappingLog.HeaderRow.Cells.Count; i++)
{
dt.Columns.Add(grdMappingLog.HeaderRow.Cells[i].Text);
}
}
foreach (GridViewRow row in grdMappingLog.Rows)
{
DataRow dr;
dr = dt.NewRow();
for (int i = 0; i < row.Cells.Count; i++)
{
dr[i] = row.Cells[i].Text.Replace(" ", "");
}
dt.Rows.Add(dr);
}
【问题讨论】:
-
到目前为止你有没有尝试过?
-
检查已编辑的代码部分