ASP.NET GridView RowIndex As CommandArgument

前端 未结 9 1619
天涯浪人
天涯浪人 2020-11-30 23:40

How can you access and display the row index of a gridview item as the command argument in a buttonfield column button?



            


        
9条回答
  •  不思量自难忘°
    2020-12-01 00:31

    with paging you need to do some calculation

    int index = Convert.ToInt32(e.CommandArgument) % GridView1.PageSize;
    

提交回复
热议问题