This is a migrated thread and some comments may be shown as answers.

RadWindow autosize causes pane widths to go wild

3 Answers 106 Views
Window
This is a migrated thread and some comments may be shown as answers.
golddog
Top achievements
Rank 1
golddog asked on 27 Oct 2011, 04:09 PM
We've got a weird situation.  We open a RadWindow to let the user input query criteria.  Within this RadWindow is a RadSplitter, within which are three RadPanes: header, input, footer.  Within the input RadPane are several asp Panels, each of which displays a different kind of input (text, date, address-type info, etc).  Depending on the type of field selected, we make the appropriate Panel visible.

Upon opening the RadWindow, we include a javascript file whose Load function calls this:
function SizeToFit() {
    window.setTimeout(
            function () {
                var oWnd = GetRadWindow();
                oWnd.autoSize();
            }, 250);
}

Here's the weird part: if the user selects a date-type of input, the RadPane wrapping the content gets rendered as:
<div id="RAD_SPLITTER_PANE_CONTENT_ParamPane" style="width: 1193046px; height: 300px; overflow: hidden;">

The Panel we make visible for date contains a checkbox and a PeterBlum  DateTextBox.

If I comment out the autoSize() call, the RadWindow sizes to whatever it's called with.  Of course, we want it to auto size depending on which Panel we make visible, so that's not a good option.

Note that 1193046 (base 10) = 123456 (base 16).  There's no way that's a coincidence; somehow, autosize is picking up a crazy default value.  Also note this weird behavior is IE-only.

I'm sure I've isolated it to interaction between PB DateTimeBox and RadPane; I've added a DateTimeBox to one of the other Panels to test, and the RadPane blows out.  Also, I've removed it from the date-time Panel and the RadPane's width renders more normally.

What the specific interaction between the two which causes the width to go wild is, I haven't been able to uncover yet.

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 28 Oct 2011, 12:40 PM
Hello Scott,

This is the first time such an issue is reported and I am also not sure what the reason for this behavior may be. What I can advise at this point is the following:

1) Replace the PeterBlum DateTextBox with the RadDatePicker, as we have also had no reports of issues with it and it will also allow a more consistent look and feel of your page together with the other RadControls

2) Make sure that you have the necessary styles for the splitter to resize with its parent - i.e. width and height set for all its parent elements, including html, body, form {height: 100%; padding: 0; margin: 0;}

3) try calling the RadSplitter's repaind() method after autosizing

4) if the above does not help please prepare and send us a simple project where this behavior can be observed so we can debug it and hopefully see what is going on.


Kind regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
golddog
Top achievements
Rank 1
answered on 28 Oct 2011, 03:04 PM
Marin,

Thanks for the suggestions.  Mr. Blum gave me the suggestion of adding a DateTextBox to the page which invoked the RadWindow.  This works, and the RadPane's width is set reasonably on autoSize.  We believe, then, that the exploded width is due to a flaw with the RadPane's calculation of width on some of the hidden elements, most likely the popup calendar.

Since I now have something which is releasable, I'm going to back-burner these suggestions, but I will try to make a simple project which mimics these conditions and dig into the details of what's casuing this weirdness.

When I get that going, I'll be in touch and we'll work it out from there.

Note that (I can't stress this enough) the width we end up with converts to 123456 in hex.  There's no way this is a coincidence.  I'm guessing that the width calcuation comes across a condition where it uses this crazy default value buried somewhere.

Thanks again,

Scott
0
Marin Bratanov
Telerik team
answered on 31 Oct 2011, 10:24 AM
Hi Scott,

I am glad to hear that you have a solution for the time being. Do look into my suggestions at your leisure. In the meantime I put a search through the RadSplitter's code and there are no hardcoded values, so this issues stems from something else, yet at this point I cannot say exactly what. If using the RadDatePicker is not an option for you please send us a simple, runnable project so we can investigate the issue when you have any further information on the matter.

Best wishes,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Window
Asked by
golddog
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
golddog
Top achievements
Rank 1
Share this question
or