private void buttonOK_Click(object sender, EventArgs e)
        {
            //
            List <string> lst = new List <string>();

            for (int i = 0; i < dataGridView1.RowCount; i++)
            {
                string name = VPLUtil.ObjectToString(dataGridView1.Rows[i].Cells[0].Value);
                if (!string.IsNullOrEmpty(name))
                {
                    lst.Add(name);
                }
            }
            string[] valueList = new string[lst.Count];
            lst.CopyTo(valueList, 0);
            DataEditorLookup de = this.SelectedEditor as DataEditorLookup;

            if (de == null)
            {
                de = new DataEditorLookup();
                this.SetSelection(de);
            }
            de.values         = valueList;
            this.DialogResult = DialogResult.OK;
        }
        public DlgEditNameValueList(DataEditor editor)
            : base(editor)
        {
            InitializeComponent();
            DataEditorLookup delk = editor as DataEditorLookup;

            if (delk != null)
            {
                LoadData(delk.values);
            }
        }
        protected override void OnClone(DataEditor cloned)
        {
            DataEditorLookup obj = cloned as DataEditorLookup;

            if (values != null)
            {
                obj.values = new string[values.Length];
                for (int i = 0; i < values.Length; i++)
                {
                    obj.values[i] = values[i];
                }
            }
        }