ナビゲータのナビゲーションを変更するには、Index を次のように変更します。
Visual Basicでコードを書く場合
| Visual Basic |
コードのコピー
|
|---|---|
Private Sub c1DbNavigator1_BeforeAction(sender As Object, e As C1.Win.C1Input.NavigatorBeforeActionEventArgs)
If e.Button = C1.Win.C1Input.NavigatorButtonEnum.First Then
' 最初のレコードではなく、2番目のレコードに移動します
e.Index = 1
End If
' 入力された数値が大きすぎる場合は、最後の行に移動します
If e.Button = C1.Win.C1Input.NavigatorButtonEnum.Position AndAlso e.Cancel Then
e.Cancel = False
End If
End Sub
|
|
C#でコードを書く場合
| C# |
コードのコピー
|
|---|---|
private void c1DbNavigator1_BeforeAction(object sender, C1.Win.C1Input.NavigatorBeforeActionEventArgs e)
{
if (e.Button == C1.Win.C1Input.NavigatorButtonEnum.First)
{
// 最初のレコードではなく、2番目のレコードに移動します
e.Index = 1;
}
// 入力された数値が大きすぎる場合は、最後の行に移動します
if (e.Button == C1.Win.C1Input.NavigatorButtonEnum.Position && e.Cancel)
{
e.Cancel = false;
}
}
|
|