0

When a DataRepeater has focus I'd like the tab key to move focus to the next control on the form rather than tabbing through each of the items listed in the DataRepeater. How can I do this? Is there some property I can set?

So far I have tried several variations of trapping the tab key on the keypress event and attempting to force it to move to the next control, like below, but it's not working:

    Private Sub BayDataRepeater_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles BayDataRepeater.ItemTemplate.KeyPress
        If Asc(e.KeyChar) = Keys.Tab Then
            BayDataRepeater.ItemTemplate.SelectNextControl(BayAddButton, _
                                                           True, True, _
                                                           False, True)
        End If
    End Sub
Toby
  • 9,696
  • 16
  • 68
  • 132

1 Answers1

0

On the DataRepeater set the TabStop property to False.

Ali
  • 1,462
  • 2
  • 17
  • 32
  • I think that would prevent the user from tabbing away from the control *at all* instead of just preventing them from tabbing through the DataRepeater.Items. – Toby Dec 18 '13 at 12:10