Exemple #1
0
        private void butDelete_Click(object sender, EventArgs e)
        {
            System.Windows.Forms.DialogResult result = DevExpress.XtraEditors.XtraMessageBox.Show("Are you sure you want to remove player: " + gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "PlayerID") + "?", "WOT Statistics", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            // Confirm user wants to delete
            if (result == System.Windows.Forms.DialogResult.Yes)
            {
                pl.Remove(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "PlayerID").ToString());
                gridView1.DeleteRow(gridView1.FocusedRowHandle);
            }

            ControllButtons();
        }