public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { //Control owner = ((System.Windows.Forms.PropertyGridInternal.GridEntry)context).OwnerGrid.Parent; var owner = (IWin32Window)context.GetReflectedValue("OwnerGrid").GetReflectedValue("Parent"); string cs = ChuckHill2.Forms.ConnectionStringDlg.Show(owner, value.ToString()); return(string.IsNullOrWhiteSpace(cs) ? value : cs); }