Reputation:
Good morning all.
I have a DBGridEh like this:
When I press Tab Button first time, the taborder does normally (left to right). But when i am in last column, i press tab and it focus on Bodega column. Why not is focusing on Referencia column?
UPDATE: I solved part of the problem with this code on KeyPress event:
DBGridItems.SelectedIndex := DBGridItems.FieldColumns['codigo_ref'].Index;
DBGridItems.Columns[DBGridItems.SelectedIndex].Field.FocusControl;
When no info on line, it gets on Referencia column, but when I create a new line, it gets me to Bodega column yet.
Thanks for your help.
Upvotes: 0
Views: 612
Reputation:
The reason of the tab order was: the 'Referencia' column in ReadOnly property was TRUE because of a procedure that was putting the column like that. If the column is in ReadOnly, the tab order avoid that column.
The solution was: erase the column of the procedure and the tab order is locating now on the desired column.
Upvotes: 1