public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService svc = (IWindowsFormsEditorService)
                                             provider.GetService(typeof(IWindowsFormsEditorService));

            if (svc != null)
            {
                COLECTION_EDITOR FormConsulta;
                if (value == null)
                {
                    return(null);
                }
                Type  mTipo  = value.GetType();
                VENTA Origen = (VENTA)context.Instance;
                mTipo = typeof(VENTA_DETALLE);
                object[] mParams = new object[2];
                mParams[0]   = Origen.getvDB();
                mParams[1]   = Origen.Venta;
                FormConsulta = new COLECTION_EDITOR(context, mTipo, "Editor de:" + context.PropertyDescriptor.Description, value, Origen.getvDB(), mParams, null, new string[] { "_mFACTURA" });
                svc.ShowDialog(FormConsulta);

                DB_BASE[] mResult = FormConsulta.Lista;
                VENTA_DETALLECollection mValor = new VENTA_DETALLECollection();
                for (int i = 0; i < mResult.Length; i++)
                {
                    mValor.Add((VENTA_DETALLE)mResult[i]);
                }
                value = mValor;
            }
            return(value);
        }
 public VENTA_DETALLECollectionPropertyDescriptor(VENTA_DETALLECollection coll, int idx) :
     base("#" + idx.ToString(), null)
 {
     this.collection = coll;
     this.index      = idx;
 }