대신 Gridview Databound event
을 사용하는 것이 좋습니다. 때문에
언로드 이벤트는 서버 컨트롤이 메모리에서 언로드 될 때 발생합니다. 서버 컨트롤에서 데이터 소스에 바인딩 후
protected void GridView1_DataBound(object sender, EventArgs e)
{
foreach (GridViewRow row in grvSearchRingTone.Rows)
{
String coltext = row.Cells[1].Text;
}
}
데이터 바인딩 이벤트가 발생합니다.
은, 그것은있는 GridViews
RowDataBound
이 도움이 이벤트 즉
protected void gvUsers_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
String coltext = e.Row.Cells[1].Text
}
else if(e.Row.RowType == DataControlRowType.DataRow)
{
String coltext = e.Row.Cells[1].Text
}
}
희망으로 수행 할 수 MSDN
무엇을 달성하고 싶습니까? –