xl_kid 08.03.2018 15:56
Predmet:Re: Enter kao tab u DataGridView kako?

Neće. NeÅ¡to ne Å¡tima. I dalje posle unosa ili pregleda na prvo polje ide red ispod i tako dalje.

Gjoreski 08.03.2018 18:13
Predmet:Re: Enter kao tab u DataGridView kako?

gde si stavio funkcija?

Proveri dali na onKey_Down nastan kad udaris enter nesto se dogadza na primer stavi msgbox

PreuzmiIzvorni kôd (vbnet):
  1.  If e.KeyChar = Microsoft.VisualBasic.ChrW(Keys.Return) Then
  2.         'SendKeys.Send("{TAB}")
  3.         MessageBox.Show("OK")
  4.         e.Handled = True
  5.     End If

Gjoreski 09.03.2018 11:54
Predmet:Re: Enter kao tab u DataGridView kako?

Ne bi trebalo biti problema.Ja kod mene isto tako radim samo razlikaje sto ne koristim standardni grid neko imam drugi grid.
Ovaj grid koj ja ga koristim ne radi vo vb.Net.
Znam da moze ova da se resi i sa standardni gridovi,100% nesto si propustio.
Nemam ja instalirano vb.Net da mogu da probam.

xl_kid 08.03.2018 12:53
Predmet:Enter kao tab u DataGridView kako?

Pomoć prijatelja Smiling
kako da u DataGridView-u nateram ENTER da radi kao TAB. Dole je kod sa forme

podešavanja
EditMode: EditOnEnter

cod
Public Class Form1

Private Sub PorudzbineBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles PorudzbineBindingNavigatorSaveItem.Click
Try
Me.Validate()
Me.PorudzbineBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.Porudzbine_DataSet)
Me.PorudzbineDetaljiTableAdapter.Update(Me.Porudzbine_DataSet)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try

End Sub

Private Sub Form1_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.Enter Then
Me.SelectNextControl(Me.ActiveControl, True, True, True, False) 'for Select Next Control
End If
End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Porudzbine_DataSet.PorudzbineDetalji' table. You can move, or remove it, as needed.
Me.PorudzbineDetaljiTableAdapter.Fill(Me.Porudzbine_DataSet.PorudzbineDetalji)
'TODO: This line of code loads data into the 'Porudzbine_DataSet.Relacije' table. You can move, or remove it, as needed.
Me.RelacijeTableAdapter.Fill(Me.Porudzbine_DataSet.Relacije)
'TODO: This line of code loads data into the 'Porudzbine_DataSet.Kupci' table. You can move, or remove it, as needed.
Me.KupciTableAdapter.Fill(Me.Porudzbine_DataSet.Kupci)
'TODO: This line of code loads data into the 'Porudzbine_DataSet.Porudzbine' table. You can move, or remove it, as needed.
Me.PorudzbineTableAdapter.Fill(Me.Porudzbine_DataSet.Porudzbine)

End Sub

Private Sub NazivComboBox_LostFocus(sender As Object, e As EventArgs) Handles NazivComboBox.LostFocus
Dim id_dm As New Porudzbine_DataSetTableAdapters.KupciTableAdapter

Try
KupacIDTextBox.Text = id_dm.id_dm_ScalarQuery(NazivComboBox.Text)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
End Sub

Private Sub PorudzbineDetaljiDataGridView_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles PorudzbineDetaljiDataGridView.CellEndEdit

Dim naziv_proizvoda As New Porudzbine_DataSetTableAdapters.ProizvodiTableAdapter

If e.ColumnIndex = 0 Then

If Val(PorudzbineDetaljiDataGridView.Rows(e.RowIndex).Cells(e.ColumnIndex).Value) > 0 Then
PorudzbineDetaljiDataGridView.Rows(e.RowIndex).Cells(e.ColumnIndex + 1).Value = naziv_proizvoda.NazivProizvoda_ScalarQuery(CInt(Val(PorudzbineDeta
ljiDataGridView.Rows(e.RowIndex).Cells(e.ColumnIndex).Value)))

End If

End If

End Sub

End Class