If CurrentTable.AllowEdit Then Dim Result As DialogResult Result = MessageBox.Show("Remove Delete All?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If Result = DialogResult.Yes Then CurrentTable.DataTable.datarows.clear End If Else msgbox("此表不能编辑") End If