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

Full postback only in Firefox after RadWindow

3 Answers 85 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
TonyG
Top achievements
Rank 1
TonyG asked on 31 Mar 2010, 11:30 PM
I don't know if this is related to other reports on full postbacks.  I have an app that works fine in IE and Firefox. I'm getting partial postbacks as expected, and no page flicker. I see that when I launch a RadWindow as a modal dialog, then close it, from that point forward the main page flickers on every request.  That only happens with FireFox, not IE.

Any ideas?
Thanks!

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 05 Apr 2010, 03:34 PM
Hi Tony,

I am not quite sure what exactly is your setup. Could you please provide me with more information about the following parts of your project :

  • how do you trigger the AJAX postback. 
  • I need your RadWindow control setup
  • I need you full RadAjaxManager control setup with all controls that it is configured to update

For your convenience I suggest you to open a new support ticket and send me a full working project, demonstrating the issue you are facing. Thus I could be able to help you further in resolving it.

Greetings,

Pavlina

the Telerik team


Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
TonyG
Top achievements
Rank 1
answered on 05 Apr 2010, 05:02 PM
I don't mind filing a support ticket but, as with most of these issues, we're working with large and complex projects for clients and sending Telerik our projects is extremely difficult for many reasons.  Let's try to work this out here.

I have a main.aspx page with some user controls.
One of the controls has a RadGrid. In the grid I launch a RadWindow as follows:

The user clicks a cell and from the ItemCommand event the following is executed:
RadAjaxManager.GetCurrent(this.Page).ResponseScripts.Add("OpenEditWindow();"); 
That executes this script which is within a RadCodeBlock:
function OpenEditWindow() {  
  var oWnd = $find("<%= win1.ClientID %>");  
  oWnd.show();  
And here is the window definition:
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Visible="true">  
  <Windows> 
    <telerik:RadWindow Modal="true" Width="800px" Height="510px" 
      Behaviors="Move, Close" VisibleStatusbar="false" ReloadOnShow="true" 
      ID="win1" runat="server" NavigateUrl="ScheduleEdit.aspx" 
      OnClientClose="OnClientClose" /> 
  </Windows> 
</telerik:RadWindowManager> 

That aspx page has nothing but another user control, plus a RadAjaxManager, RadSkinManager, RadStyleSheetManager, and RadScriptManager.

When the RadWindow opens the user can press a simple Cancel button. The code-behind for this executes:
RadAjaxManager.GetCurrent(this.Page).ResponseScripts.Add("CloseWindow(1);"); 
And here's the script in the UC (not in a RadCodeBlock):
function GetRadWindow() {  
  var oWindow = null;  
  if (window.radWindow) {  
    oWindow = window.radWindow;  
  }  
  else {  
    if (window.frameElement.radWindow) {  
      oWindow = window.frameElement.radWindow;  
    }  
  }  
  return oWindow;  
}  
 
function CloseWindow(doRefresh) {  
  var oArg = new Object();  
  oArg.Refresh = doRefresh; // tell parent (1/0) refresh data  
  //get a reference to the current RadWindow  
  var oWnd = GetRadWindow();  
  oWnd.close(oArg);  

The window closes and the script in the parent UC executes:
function OnClientClose(oWnd, args) {  
  //get the transferred arguments  
  var arg = args.get_argument();  
  if (arg) {  
    var doRefresh = arg.Refresh;  
    if (doRefresh == 1) {  
      var btn;  
      try {  
        btn = $get("<%= btnRefresh.ClientID %>");  
      } catch (ex) {  
        alert(  
        "Error finding refresh button:\n" 
         + ex.name.toString() + "\n" 
         + ex.message);  
      }  
      if (btn) {  
        btn.onclick();  
      }  
    }  
  }  
}  
 

As you can see, if the UC in the window wants to force a refresh, we just click a button in the parent UC.

You asked for the RadAjaxManager - here is the proxy from the parent UC:
<telerik:RadAjaxManagerProxy ID="RAMPUCScheduleDisplay" runat="server">  
  <AjaxSettings> 
    <telerik:AjaxSetting AjaxControlID="gridScheduling">  
      <UpdatedControls> 
        <telerik:AjaxUpdatedControl ControlID="gridScheduling" LoadingPanelID="GridProgress" /> 
      </UpdatedControls> 
    </telerik:AjaxSetting> 
    <telerik:AjaxSetting AjaxControlID="btnRefresh">  
      <UpdatedControls> 
        <telerik:AjaxUpdatedControl ControlID="gridScheduling" LoadingPanelID="GridProgress" /> 
      </UpdatedControls> 
    </telerik:AjaxSetting> 
  </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 

The UC displayed in the window has this proxy:
<telerik:RadAjaxManagerProxy ID="RAMPUCScheduleEdit" runat="server">  
  <AjaxSettings> 
    <telerik:AjaxSetting AjaxControlID="RadTabStrip1">  
      <UpdatedControls> 
        <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> 
        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="Progress1" /> 
      </UpdatedControls> 
    </telerik:AjaxSetting> 
    <telerik:AjaxSetting AjaxControlID="RadMultiPage1">  
      <UpdatedControls> 
        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="Progress" /> 
      </UpdatedControls> 
    </telerik:AjaxSetting> 
  </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 

The Cancel button that triggers the window close is not ajaxified through the proxy, perhaps it should be:
<asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click" 
    Enabled="true" Width="60px" UseSubmitBehavior="False" /> 

I think that's the end-to-end set of code for this functionality and you/we can probably use that to create a test case.  I'll provide more as required.  If you can provide a couple lines of code, I'll be happy to insert checks in different places to find the value of some setting that determines whether or not we're using Ajax.

Thanks!
0
Pavlina
Telerik team
answered on 08 Apr 2010, 03:09 PM
Hello Tony,

I reviewed the logic in the code provided, and it looks correct.
However, in order to properly assist you, I would suggest that you open a formal support ticket and send us a small working project, which demonstrates the problem you are facing under Firefox. We will review it locally, and advise you further.

All the best,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Ajax
Asked by
TonyG
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
TonyG
Top achievements
Rank 1
Share this question
or