Beispiel #1
0
        protected override void lookupForm_lookupCallback(LookupArg arg)
        {
            base.lookupForm_lookupCallback(arg);

            if (EditingControlDataGridView.CurrentCell != null)
            {
                (EditingControlDataGridView.CurrentCell as DataGridViewLookupCell).resetSize(this.Text_Lookup);
            }

            valueChanged = true;
            this.EditingControlDataGridView.NotifyCurrentCellDirty(true);
        }
        public static bool getLookupValue(DataGridViewCell cell, out object result)
        {
            result = null;
            LookupArg temp = (cell as DataGridViewLookupCell).EditedValue as LookupArg;

            if (temp != null && !string.IsNullOrEmpty(temp.Text))
            {
                result         = temp.Value;
                cell.ErrorText = string.Empty;
                return(true);
            }
            else
            {
                cell.ErrorText = "此项为必填!";
                return(false);
            }
        }