Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > ImageUrlEditor on subcontrol does not work

Reply
Thread Tools

ImageUrlEditor on subcontrol does not work

 
 
Ray
Guest
Posts: n/a
 
      06-06-2004
I have a WebControl which contains another WebControl. Both have an ImageUrl property, code see below
In the property grid the ImageUrlEditor works on the parent control but not on the subcontrol's expanded property
This may or may not be related with the problem that other subproperties are not refreshed automatically and that the subproperty's designer is never called
Thanks for any suggestions
Ra

namespace Test

[ ParseChildren(false)
ToolboxData("<{0}:TestControl runat=server></{0}:TestControl>")
public class TestControl : System.Web.UI.WebControls.WebContro

private Tests.SubControl tsc = new SubControl()
private string mstrImageUrl = string.Empty

[ Description("Test subproperty.")
DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content)
PersistenceMode(PersistenceMode.InnerProperty)
public Tests.SubControl SubControl
get { return tsc;
set { tsc = value;


[ DefaultValue("")
Editor(typeof(System.Web.UI.Design.ImageUrlEditor) ,typeof(System.Drawing.Design.UITypeEditor))
public string ImageUrl
get { return mstrImageUrl;
set { EmstrImageUrl = value;

} //END public class TestContro

public class SubControl : System.Web.UI.WebControls.WebContro

private string mstrImageUrl = string.Empty

[ DefaultValue("")
Editor(typeof(System.Web.UI.Design.ImageUrlEditor) ,typeof(System.Drawing.Design.UITypeEditor))
public string ImageUrl
get { return mstrImageUrl;
set { mstrImageUrl = value;

} //END public class SubContro

} //END namespace Tests
 
Reply With Quote
 
 
 
 
Ray
Guest
Posts: n/a
 
      06-11-2004
I found the answer to the main question in another forum: This seems
to be a MS known issue, see http://www.asp.net/Forums/ShowPost.aspx?
tabindex=1&PostID=269214.

The subproperty refresh can be fixed by applying the
NotifyParentPropertyAttribute to the property. I had to override the
property to set the attribute and make it work.

So there remains the 'subproperty's designer is never called'
question. Any help?

Cherio
Ray

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Repeater SubControl Dropdownlist not saving SelectedValue Ben Dewey ASP .Net 3 11-01-2005 03:15 PM
setting focus to datagrid subcontrol Bonj ASP .Net 1 11-13-2004 09:47 PM
DataBinding to a subcontrol... Fred Hirschfeld ASP .Net Building Controls 0 09-18-2004 02:53 PM
Getting a subcontrol to work in a repeater James Geurts ASP .Net Building Controls 3 02-18-2004 06:04 AM
ImageUrlEditor will not open James Williams ASP .Net Building Controls 0 09-20-2003 03:37 PM



Advertisments