Beispiel #1
0
        private void gvFormItems_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            string eValue = gvFormItems.Rows[e.RowIndex].Cells[colValue.Index].Value.ToString();

            if (FormEditCell.Execute(ref eValue))
            {
                gvFormItems.Rows[e.RowIndex].Cells[colValue.Index].Value = eValue;
            }
        }
Beispiel #2
0
        public static bool Execute(ref string valueStr)
        {
            FormEditCell frm = new FormEditCell();

            frm.tbEdit.Text = valueStr;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                valueStr = frm.tbEdit.Text;
                return(true);
            }
            else
            {
                return(false);
            }
        }