public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            if (context == null || context.Instance == null || provider == null)
            {
                return(base.EditValue(context, provider, value));
            }

            frmKeyCode frm     = new frmKeyCode();
            string     inputed = frm.InputKeyCode(value.ToString());

            return(new KeyEditingType(inputed));
        }
        private void grdList_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex != 2) //edit col
            {
                return;
            }
            string     strInit = (string)(grdList.Rows[e.RowIndex].Cells[1].Value);
            frmKeyCode frm     = new frmKeyCode();

            string s = frm.InputKeyCode(strInit);

            if (s == string.Empty)
            {
                return;
            }


            grdList.Rows[e.RowIndex].Cells[1].Value = s;
        }