Ano,mate pravdu, ale myslel som to ze pouzijem obycajne Button-y a nepouzijem BindingNavigator. Skusal som pouzit BindingNavigatora, ale nedari sa mi hybat s riadkami v tabulke. Neviem co robim zle?
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
'pripojenie k databázi
conn1 = New SqlCeConnection("Data Source = C:\XXX\Test.sdf")
conn1.Open()
cmd1 = New SqlCeCommand("Select * FROM TABLE2 WHERE Id <= 38500", conn1)
BindingNavigator1.BindingSource.DataSource = cmd1.ExecuteResultSet(ResultSetOptions.Updatable Or ResultSetOptions.Scrollable)
DataGridView1.DataSource = BindingNavigator1.BindingSource.DataSource
End Sub
Tak som si chcel pomoct vlastnym osetrenim pohybu, pomocou Buttonov.
|