Example #1
0
        private void main_ultraGrid_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            int detailID = (int)e.Cell.Row.Cells[Form_task21_sec.ID_colName].Value;

            if (e.Cell.Value.Equals(Form_task21_sec.edit_colName))
            {
                Form_task21_detail detailForm = new Form_task21_detail(this.secID, detailID);
                this.Pop_detailForm(detailForm);
            }
            else if (e.Cell.Value.Equals(Form_task21_sec.del_colName))
            {
                if (MessageBox.Show("Are you sure to Delete Task " + detailID + "?", "Msg", MessageBoxButtons.OKCancel) == DialogResult.OK)
                {
                    Task21_security detail = new Task21_security(detailID);
                    if (detail == null)
                    {
                        return;
                    }

                    detail.Delete_from_DB();
                    Task21_secMaster.Reset();
                    this.Refresh_parentUI();
                    this.BindData();
                }
            }
        }