【发布时间】:2026-02-09 06:25:01
【问题描述】:
我在 GridView1_RowDataBound 事件中有一些代码用于表格的 html 设计:
if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.TableSection = TableRowSection.TableHeader;
}
else if (e.Row.RowType == DataControlRowType.DataRow)
{
TableCellCollection cell = e.Row.Cells;
cell[0].Attributes.Add("data-title", "");
cell[1].Attributes.Add("data-title", "Product"
}
行更新后,我需要再次执行此操作,但我不能。因为 RowUpdated EventArgs 没有 Row 属性。我该如何解决这个问题?
【问题讨论】:
标签: c# asp.net gridview objectdatasource