I would like to buy the ASPxPopupControl, but I need to know this problem can be solved.
If there is a wide control, like in the example below, the ASPxPopupControl becomes as wide as that control, even though the wide control is in a scrollable panel.
I know that I can make the scrollable panel a fixed width, but then the "AllowResize" feature becomes useless.
Please help.
Thanks, Chris Milne
<dxpc:ASPxPopupControl ID="ASPxPopupControl1" runat="server" AllowDragging="True"
AllowResize="True" Height="145px" ShowOnPageLoad="True" Width="300px">
<ContentCollection>
<dxpc:PopupControlContentControl runat="server">
<asp:Panel ID="Panel1" runat="server" Height="100%" ScrollBars="Both" Width="100%">
<asp:Label ID="Label1" runat="server" Text="longtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtext"></asp:Label>
</asp:Panel>
</dxpc:PopupControlContentControl>
</ContentCollection>
</dxpc:ASPxPopupControl>
Hello Chris,
The label control cannot word-wrap text that doesn't contain spaces. The best solution is to use our ASPxMemoEdit control. Here is some sample code:
<%-- Memo resizing within the ASPxPopupControl is possible only when resizing mode is Postponed. --%> <dxpc:ASPxPopupControl ID="pcPopupControl" runat="server" Width="200px" Height="145px" AllowDragging="True" AllowResize="True" ResizingMode="Postponed" ShowOnPageLoad="True"> <ContentStyle> <Paddings Padding="5px" /> </ContentStyle> <ContentCollection> <dxpc:PopupControlContentControl ID="PopupControlContentControl1" runat="server"> <dxe:ASPxMemo ID="ASPxMemo1" runat="server" Height="100%" Width="100%" ClientInstanceName="memo" Text="longtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtextlongtext"> <Border BorderStyle="None" /> </dxe:ASPxMemo> </dxpc:PopupControlContentControl> </ContentCollection> </dxpc:ASPxPopupControl>
Thanks,
Nick
I know the label does not wrap in the middle of a word.
I do not want it to. I want a scroll bar.
What if my control is not a label, but instead a grid or table with many columns?
How can I make the popup control handle that?
Hello Chris,
You will need to write your own code to resize an inner control. You should handle the ASPxClientPopupControl.Resize event and explicitly assign the height/width to the inner control.
Thanks,
Nick
Great Idea Nick!
But I can not figure out how to make that work.
Do you think you could give me some sample code?
Or is there some documatation that describes how to do this?
Thanks for all your help,
Chris Milne
Hello Chris,
Our ASPxMemoEdit control has special javascript code to enable client-size resizing. You can find it in C:\Program Files\Developer Express .NET v8.1\Sources\DevExpress.Web.ASPxEditors\Scripts\TextEdit.js module on your disk.
Thanks,
Nick
Thanks Nick, but I am not using the ASPxMemoEdit control.
It is the ASPxPopupControl that is the problem.
The actual content(set of controls) inside the popup varies.
I need the the popup to be able to handle wide controls in the content.
The solution I thought you were suggesting was to have a scrollable panel (or div) that changes its size on the popup's client side resize event.
This sounds like it might work, but I could not figure out how to make client side code run on the popup's resize event.
So what I really want is an example or documentation that shows how to get javascript code to run on the ASPxPopupControl's client side resize event.
Sorry if I was not clear about that.
Thanks,
Chris Milne
Chris,
Do you know how to change the size of a div and its inner elements via client-side script? We have similar code in DevExpress.Web.ASPxEditors\Scripts\TextEdit.js. You can copy our code and adapt it to your situation. It's not and easy task. We share our code with you - there is nothing more we can help you with concerning this particular task. Please don't ask us to show a solution in an application in your situation. It's a bit beyond our duties, I apologize.
Thanks,
Nick
SEE ALSO:
Q130353 ("Popup control resizes when image control contains a big image")