Wednesday, July 8, 2009

Devexpress ASPxPopupControl content loading advanced example

Fact:
Using ASPxPopupControl to dynamically load user control(ascx) to popup content, you found that size of popup control is auto-resized to fit the size of loaded control (see example from devexpress code central - E346).

Why:
This is because we get html code of ascx control using ASPxCallback.GetRenderResult, which is later set to popup control using SetContentHtml function - this will internally set innerHTML of div with html code of our user control (ascx).

Problem:
Using ASPxPopupControl to dynamically load aspx page (not user control) to popup content using function SetContentUrl, you have problem - NO auto-resize of popup content area to respect size of loaded aspx page within popup iframe.

Solution:
Last weeks i try to do my best to make auto-resizing feature when popup control loads aspx page using
SetContentUrl.
Finally i have an solution with such feature as an advanced example demo.

Download:
You can download example demo from
http://www.freewebs.com/terrorix/files/blog/ASPxPopupControl_AdvExample.zip

Please feel free to add comment if you have any question.

9 comments:

  1. Hi Peter,

    I would be grateful if you could re-upload the example file cause I can not download it

    Regards
    Masi

    ReplyDelete
  2. I test it and it works well, but you can also download it from here (http://community.devexpress.com/forums/t/68592.aspx) as post attachment from me (Peter Šulek)

    ReplyDelete
    Replies
    1. can you re-post the download to the solution cant find it.

      Delete
  3. Thanks, Peter.
    There are some good ideas in the project.

    Andrew

    ReplyDelete
  4. Hi peter I had an issue in using ASPXPopup control can you help me

    ReplyDelete
  5. Upload again please

    ReplyDelete
  6. can you re-post the download to the solution cant find it.

    ReplyDelete