C
caoran
Unregistered / Unconfirmed
GUEST, unregistred user!
为什么我建了一个分页datagrid在提取单元格内容时,不翻页没问题,一翻页就出错,说是“指定的参数已超出有效值的范围”。怎么回是?
下面是出错程序部分。
Protected Sub DataGrid1_icmd(ByVal sender As System.Object, ByVal e As DataGridCommandEventArgs)
Dim id1 As Short
Dim str1 As String
Dim itemCell As TableCell
id1 = e.Item.ItemIndex + 1
str1 = e.Item.Cells(2).Text
Label1.Text = id1 + DataGrid1.CurrentPageIndex * DataGrid1.PageSize
End Sub
下面是出错程序部分。
Protected Sub DataGrid1_icmd(ByVal sender As System.Object, ByVal e As DataGridCommandEventArgs)
Dim id1 As Short
Dim str1 As String
Dim itemCell As TableCell
id1 = e.Item.ItemIndex + 1
str1 = e.Item.Cells(2).Text
Label1.Text = id1 + DataGrid1.CurrentPageIndex * DataGrid1.PageSize
End Sub