This is a migrated thread and some comments may be shown as answers.
RadRotator not resizing on browser resize
3 Answers 28 Views
This is a migrated thread and some comments may be shown as answers.
Bertha
Top achievements
Rank 1
Bertha asked on 30 Jan 2013, 02:58 PM
I want to use a simple solution as suggested in
http://www.telerik.com/community/forums/aspnet-ajax/rotator/radrotator-resizing-issue.aspx

window.onresize=function()
  {  
     var rotatorElement = $get("<%= Rttr.ClientID %>");    
      rotatorElement.style.width = "225px";
      rotatorElement.style.height= "285px";  
   }

But why it is not working?  I used alert to check the style.width and it was set correctly. But the rotator was not refreshed.

I tried using the Ajax request (asp.net mvc4). But when I resize the browser, I have this error popup:

Unhandled exception at line 15, column 16485 in http://localhost:53858/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:c9cbdec3-c810-4e87-846c-fb25a7c08002:ea597d4b:b25378d2;Telerik.Web.UI,+Version=2012.3.1308.45,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:48dafc6d-3931-4c62-bfce-67d8969e45df:16e4e7cd:f7645509:24ee1bba:7165f74:ed16cbdc:19620875:3f6e8f3f

0x800a139e - JavaScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near '

 

<!DOCTYPE html>
'.

3 Answers, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 01 Feb 2013, 12:27 PM
Hello Bertha,

The size of the RadRotator control should be specified on the server so that it can correctly perform the calculations needed for sliding its items. If you want to modify the rotator's width and height when the browser is resized, you can do so by initiating an AJAX request to update the properties Width, Height, ItemWidth and ItemHeight of the control. This approach is described in the Knowledge Base article Setting RadRotator's size in percent. You can use it as a reference for your further development.

I noticed that you have reported the same problem in this forum thread. Note that it will be easier to track the information on the case if it is presented in a single thread. This is why I would suggest continuing our discussion in only one of the threads.

Regards,
Slav
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
Bertha
Top achievements
Rank 1
answered on 06 Feb 2013, 08:01 PM
I tried using the Ajax request on Master page of asp.net mvc4. But when I resize the browser, I have this error popup:

Unhandled exception at line 15, column 16485 in http://localhost:53858/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:c9cbdec3-c810-4e87-846c-fb25a7c08002:ea597d4b:b25378d2;Telerik.Web.UI,+Version=2012.3.1308.45,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:48dafc6d-3931-4c62-bfce-67d8969e45df:16e4e7cd:f7645509:24ee1bba:7165f74:ed16cbdc:19620875:3f6e8f3f

0x800a139e - JavaScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near '

 

<!DOCTYPE html>
'.

I changed and tried to put the rotator in usercontrol and called javascript resize to load in the user control programmatically. The first loading and resize worked correctly but if I refresh the page, I got the following error:

$(window).resize(function () {
               if ($("#rotatorWidth").val() != $(window).width()) {
                   delay(function () {
                           $('#rotatorContainer').load('../GetBanner/');
                   }, 500);
               }
            });

Unhandled exception at line 1591, column 49 in script block

0x800a139e - JavaScript runtime error: Sys.ArgumentTypeException: Object of type 'Sys._Application' cannot be converted to type 'Sys._Application'.

Parameter name: instance

Edit your post

0
Slav
Telerik team
answered on 11 Feb 2013, 03:00 PM
Hi Bertha,

Please note that the solution I suggested is designed for an ASP.NET website. The ASP.NET MVC projects do not use the page and control lifecycle so the implementation will have to be modified in order to be applicable to the platform that you use.

I will need to examine your setup in order to help you combine the two technologies and achieve the desired functionality, if this is possible. Please open a support ticket and send a simple, fully runnable project that isolates your case so that I can inspect it locally.

Greetings,
Slav
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.
Asked by
Bertha
Top achievements
Rank 1
Answers by
Slav
Telerik team
Bertha
Top achievements
Rank 1
Share this question
or