private void sb_ok_Click(object sender, EventArgs e) { if (ck.CheckedItemsCount == 0) { XtraMessageBox.Show("请先选择项目!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } int result; string cb001 = string.Empty; // ck.SelectedValue.ToString(); int count = ck.CheckedIndices.Count; var chkIndexCollection = ck.CheckedIndices; for (int i = 0; i < count; i++) { var sysusers = ck.DataSource as DataTable; var item = sysusers.Rows[chkIndexCollection[i]]; //chkIndexCollection[i]获得选中行在chechedListBOX的index 关键代码 cb001 = item["CB001"].ToString(); result = FireAction.ApplyUserCombo(AC001, cb001, Envior.cur_user.UC001 ); if (result < 0) { return; } } DialogResult = DialogResult.OK; this.Close(); }