(GridView)为什么在RowDataBound里面e.Row.Cells[0].Text值是空的?
protected void gvCptList_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowIndex > -1)
{
e.Row.Attributes.Add("onclick", "window.showModalDialog('ComputerMX.aspx?index=" + e.Row.Cells[0].Text + "');");
}
}
母页面的gridview控件的第一列是id,我是想单击表格后把ID传到新页中去,但是新页?index后面值是空的,请教这是为何?