在控件的RowDataBound事件中添加如下代码:

   If e.Row.RowIndex <> -1 Then
            Dim orderID As Integer
            orderID = e.Row.RowIndex + 1
            e.Row.Cells(0).Text = orderID.ToString
    End If

就可以实现自动编号的功能。

相关文章:

  • 2021-11-21
  • 2022-12-23
  • 2021-09-20
  • 2022-12-23
  • 2021-07-31
  • 2022-12-23
  • 2021-12-22
猜你喜欢
  • 2021-07-27
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2021-06-06
  • 2021-12-09
相关资源
相似解决方案