Blogger Template by Blogcrowds

RowDatabound Asp.net

RowDataBound ASP.NET Example

protected void gvDep_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType==DataControlRowType.DataRow)
{
((LinkButton)(e.Row.Cells[1].Controls[1])).Text = gvDep.DataKeys[e.Row.RowIndex].Value.ToString();
((ImageButton)(e.Row.Cells[4].Controls[1])).CommandArgument = gvDep.DataKeys[e.Row.RowIndex].Value.ToString();
e.Row.Cells[3].Text = (e.Row.Cells[3].Text == "True") ? Common.Flag.Activate.ToString() : Common.Flag.InActivate.ToString();
}
}

0 ความคิดเห็น:

บทความใหม่กว่า บทความที่เก่ากว่า หน้าแรก