| First add a bound column to GridView at position 0 in databound field and addevent RowDataBound to the GridView
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].Text =Convert.ToInt32(e.Row.RowIndex+1).ToString();
}
} | | |