本文共 1402 字,大约阅读时间需要 4 分钟。
参考:https://blog.csdn.net/sinat_27305053/article/details/80014441?utm_source=distribute.pc_relevant.none-task
gridView.GridControl.UseEmbeddedNavigator = true; gridView.GridControl.EmbeddedNavigator.Buttons.Append.Visible = false; gridView.GridControl.EmbeddedNavigator.Buttons.Edit.Visible = false; gridView.GridControl.EmbeddedNavigator.Buttons.EndEdit.Visible = false; gridView.GridControl.EmbeddedNavigator.Buttons.CancelEdit.Visible = false; gridView.GridControl.EmbeddedNavigator.Buttons.Remove.Visible = false;
gridView.GridControl.EmbeddedNavigator.TextStringFormat = "{0}in{1}";
gridView.GridControl.EmbeddedNavigator.ButtonClick += gridControl_EmbeddedNavigator_ButtonClick;private void gridControl_EmbeddedNavigator_ButtonClick(object sender, NavigatorButtonClickEventArgs e) { if (e.Button.ButtonType == NavigatorButtonType.Remove) { if (MessageBox.Show("Do you want to delete the current row?", "confirm deletion", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) != DialogResult.Yes) { e.Handled = true; } } }