This project is read-only.

Parts not displayed correctly in edit mode

Topics: Developer Forum, User Forum
Sep 1, 2008 at 2:22 PM
Edited Sep 1, 2008 at 3:01 PM
Hi, any clues why added parts to a page are displayed correctly when not in edit mode but when in edit mode, all parts are overlapping.
I'm using a droppable zone.
The zone from the right is displayed correctly in edit mode but  the one from the left is not.


Sep 1, 2008 at 4:58 PM
Could it be a floating issue noticeable as the window gets narrower? Can you reproduce by narrowing your browser when not in edit mode? Is it in one of the included templates? What browser/screen resolution/theme are you using?
Sep 2, 2008 at 8:23 AM
Edited Sep 2, 2008 at 9:41 AM
When not in edit mode everything is displayed correctly. I tested with Firefox and IE7 and with both the problem appear only in edit mode.
I use a custom template and theme, made by me.
Resolution 1680x1050, so I think the problem is not from here.
Any way I can modify the dimension for the displayed parts in edit mode? I think this is the problem.
The right zone have a wider displayed zone than the left one, and I need to maintain the current layout.

Sep 2, 2008 at 2:34 PM
Edited Sep 2, 2008 at 2:51 PM
It seems it was a problem with the web part I used.
I was using something like this:
<asp:ImageButton ID="ImageButton1" ImageUrl='<%$ CurrentItem: MenuImage%>' runat="server" PostBackUrl='<%$ CurrentItem: TargetUrl%>' />
but this didn't worked.

Properties were:

   49 [FileAttachment, EditableImage("Menu Image", 90)]

   50         public virtual string MenuImage

   51         {

   52             get { return (string)(GetDetail("MenuImage") ?? string.Empty); }

   53             set { SetDetail("MenuImage", value, string.Empty); }

   54         }


   56         [EditableUrl("Target Url", 100)]

   57         public virtual string TargetUrl

   58         {

   59             get { return (string)(GetDetail("TargetUrl") ?? string.Empty); }

   60             set { SetDetail("TargetUrl", value, string.Empty); }

   61         }

I changed the control to:
<n2:EditableDisplay ID="EditableDisplay1" runat="server" PropertyName="MenuImage" SwallowExceptions="true" /> and now is working.
Any idea how can I make the editable display behave like an ImageButton?

Thanks for your help,

Sep 2, 2008 at 7:03 PM
Interesting... didn't know about that PostBackUrl option. I had to try it and it worked as I expected. When I implement it directly on the aspx the click was triggered on the target page.

I can imagine the problems can begin once's id-mangling comes into play. Have you tried assigning the user control a unique ID (oninit: this.ID = "someid")
Sep 3, 2008 at 1:23 PM
The problem is not with the postback, the problem is with how is the part displayed in edit mode.
When using the image button, the part looks totally wrong when in edit mode.

Sep 3, 2008 at 7:25 PM
Oh, right.

Can you compare the url on the page in view mode to the frame in edit mode? Any differences?

Can you compare the html?

What browser are you using?