- To do this, I need to handle the ButtonClick event of the embedded navigator.
- select the grid control, in the events list, I expand the EmbeddedNavigator node and doubleclick to create a handle for the ButtonClick event.
- Since the Embedded Navigator is part of the XtraEditors Library, I’m first going to add a
- reference to the DevExpress.XtraEditors namespace.
- Now I’m going to add the following code to the event handler
Private Sub GridControl1_EmbeddedNavigator_ButtonClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraEditors.NavigatorButtonClickEventArgs) Handles GridControl1.EmbeddedNavigator.ButtonClick
If e.Button.ButtonType = NavigatorButtonType.Remove Then
If XtraMessageBox.Show(_LookAndFeel, "Anda yakin mau menghapus data?", Me.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.No Then
e.Handled = True
End If
End If
End Sub
0 komentar:
Posting Komentar