protected int i = 1;
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].Text = Convert.ToString(GridView1.PageIndex * GridView1.PageSize + i);
i++;
}
}
Google Search
Thursday, June 5, 2008
Add a Serial No column to DataGrid
Labels:
Serial No to Datagrid
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment