public override object EditValue(ITypeDescriptorContext
context, IServiceProvider provider, object value)
{
if(context == null || context.Instance == null || provider
== null)
return value;
....
MyControl ctrl = context.Instance as MyControl;
if(ctrl == null) return null;
....
}
Ahmed Hashish - 30 Sep 2007 12:34 GMT
Thanks for replay
I think you didn't got what I mean, context.Instance returns the reference of the current selected control, I need a reference for MyControl (Extender Provider) the control that provided the property the user currently editing.
best regards,
Ahmed
public override object EditValue(ITypeDescriptorContext
context, IServiceProvider provider, object value)
{
if(context == null || context.Instance == null || provider
== null)
return value;
....
MyControl ctrl = context.Instance as MyControl;
if(ctrl == null) return null;
....
}
Ahmed Hashish - 01 Oct 2007 13:12 GMT
I found it,
ExtenderProvidedPropertyAttribute EPPA = context.PropertyDescriptor.Attributes[typeof(ExtenderProvidedPropertyAttribute)] as ExtenderProvidedPropertyAttribute;
MyControl sd = (MyControl)EPPA.Provider;
thanks
Ahmed
Thanks for replay
I think you didn't got what I mean, context.Instance returns the reference of the current selected control, I need a reference for MyControl (Extender Provider) the control that provided the property the user currently editing.
best regards,
Ahmed
"Roger Stewart" <rstewart27104@gmail.com> wrote in message news:1190901166.196448.183890@r29g2000hsg.googlegroups.com...
public override object EditValue(ITypeDescriptorContext
context, IServiceProvider provider, object value)
{
if(context == null || context.Instance == null || provider
== null)
return value;
....
MyControl ctrl = context.Instance as MyControl;
if(ctrl == null) return null;
....
}
Ahmed Hashish - 30 Sep 2007 13:43 GMT
Thanks for replay
I think you didn't got what I mean, context.Instance returns the reference of the current selected control, I need a reference for MyControl (Extender Provider) the control that provided the property the user currently editing.
best regards,
Ahmed
public override object EditValue(ITypeDescriptorContext
context, IServiceProvider provider, object value)
{
if(context == null || context.Instance == null || provider
== null)
return value;
....
MyControl ctrl = context.Instance as MyControl;
if(ctrl == null) return null;
....
}