在控件的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
就可以实现自动编号的功能。
在控件的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
就可以实现自动编号的功能。
转载于:https://www.cnblogs.com/acis_/archive/2009/07/19/1526377.html

被折叠的 条评论
为什么被折叠?