First create a Column Serial Number in Grid View.
Use "RowDataBound" GridView Event.
protected void
GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].Text = Convert.ToString(e.Row.DataItemIndex + 1);
}
}
No comments:
Post a Comment