/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnCarDeduction_Click(object sender, EventArgs e) { GridCheckBoxXEditControl btn = sender as GridCheckBoxXEditControl; if (btn == null) { return; } FulUnLoadPlanDetail entity = btn.EditorCell.GridRow.DataItem as FulUnLoadPlanDetail; if (entity == null) { return; } if (btn.Checked && !this.CurrentList.Contains(entity)) { this.CurrentList.Add(entity); } else if (!btn.Checked && this.CurrentList.Contains(entity)) { this.CurrentList.Remove(entity); } }
public void InitFrom() { GridCheckBoxXEditControl btnPrintCode = superGridControl1.PrimaryGrid.Columns["operation"].EditControl as GridCheckBoxXEditControl; if (btnPrintCode != null) { btnPrintCode.CheckedChanged += new EventHandler(btnCarDeduction_Click); } }