Tuesday, 15 May 2012

How to indexing GridView record in runtime....



// how  to  indexing  gridviw record



protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)

    
{

   if (e.Row.RowType == DataControlRowType.DataRow)

        
{

    
((Label)e.Row.Cells[0].Controls[1]).Text =

(Convert.ToInt32(e.Row.RowIndex)+1).ToString();


}


    }

0 comments:

Post a Comment