是否可以获取文本框的值,例如在datarepeater的第4行。 我是通过将控制移动到它来实现的,但这并不是我想要的方式。 我使用代码DataRepeater1.currentIndex = 5,然后选择了值。是否有可能在不将控制移动到此行的情况下获取值。我的意思是我们从datagridview获取价值的方式(vrName = datagridview1.item(1,1).value)
由于 Furqan
答案 0 :(得分:0)
您应该使用DataRepeater的BindingSource并通过它导航MoveNext,MoveLast,MovePrevious和MoveFirst。在那里你可以找到你的价值,而无需将控制权移到这一行。
For i As Int32 = 0 To Me.AddressTableAdapterBindingSource.Count - 1
'you don't need to iterate through all rows if you have the index, this is only an example'
Dim row As DataRow = DirectCast(Me.AddressTableAdapterBindingSource(i), DataRowView).Row
Dim ID As Int32 = DirectCast(row("AddressID"), Int32)
Dim City As String = DirectCast(row("City"), String)
'you could also change the value'
row("City") = "[" & ID & "] " & City
Next