vb.net2005 DataGridView行移动代码
vb.net2005 DataGridView移动上一行,下一行,首行,尾行的代码是什么啊?谢谢! --------------------编程问答-------------------- 控件中好像没有这样的功能把,不过你可以用javascript:swapNode
gridview1.rows(2).swapNode(gridview1.rows(1))
数据行1行和二行交换位置 --------------------编程问答-------------------- Sheet1BindingSource.MoveFirst()
Sheet1BindingSource.MoveLast()
Sheet1BindingSource.MoveNext()
Sheet1BindingSource.MovePrevious() --------------------编程问答-------------------- '保存
Private Sub Sheet1BindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Sheet1BindingNavigatorSaveItem.Click
Me.Validate()
Me.Sheet1BindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.DataDataSet)
End Sub --------------------编程问答-------------------- '移到第一条
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Sheet1BindingSource.MoveFirst()
End Sub
'移到最后一条Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Sheet1BindingSource.MoveLast()
End Sub
'移到下一条
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Sheet1BindingSource.MoveNext()
End Sub
'移到上一条Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Sheet1BindingSource.MovePrevious()
End Sub
补充:.NET技术 , VB.NET