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

Radajaxmanager TimeOut

1 Answer 1165 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
chithuraj
Top achievements
Rank 1
chithuraj asked on 20 Apr 2011, 11:01 AM
Hello Team,
                     I am using Radajax manager,in the OnAjaxRequest event , i am writing server side method that fetches the records from the database. What happens is, Some times the ajax request gets time out and completed before the methods gets processed [ I mean fetch all the records from the backend and complete the necessary things].


How could i accomplish it by increasing the ajax request timeout.

here with i have attachedthe code for your reference. That will gives you some idea what i am talking.

ClientSide

 <script type="text/javascript" language="javascript">
        <!--
            var gstrPrimaryColor = '#ff6600';
            var gstrSecondaryColor = '#ffdba6';
        
            window.onload = function()
            {
//                setTimeout (function(){
                        var ctrl = window["<%= rdAMErroredRecords.ClientID %>"];
                        ctrl.ajaxRequest("InitialPageLoad");
//                    },
//                    50000);
            }
            function responseEnd(sender, eventArgs) {
             // var vartemp=document.getElementById('<%= hdnServiceRequestEnd.ClientID %>').value;
             //  if(vartemp!=0)
                MakeTableChanges('ErrorRecords');
//               MakeTableChanges('CXErrorRecords');
            }
        
            function MakeTableChanges(tableName){
                var rows = document.getElementById(tableName).getElementsByTagName('tr');
                var n = rows.length;
                for(var i=2; i<n; ++i){
                    var cells = rows[i].getElementsByTagName('td');
                    var tmp = cells[1].innerText;

                    var index = tmp.indexOf('|');
                    
                    if(index == 0){
                        tmp = tmp.substring(1);
                        tmp = '- ' + tmp;
                    }

                    cells[1].className = 'cssField ErroredCol';
                    cells[1].innerText = tmp.replace(/[|]/gi,'\n -');
                }
            }
        -->
        </script>

    </telerik:RadCodeBlock>

<telerik:RadScriptManager ID="rdSMErroredRecords" runat="server" EnablePageMethods="true"   >
    </telerik:RadScriptManager>

<telerik:RadAjaxManager ID="rdAMErroredRecords" runat="server" OnAjaxRequest="rdAMErroredRecords_AjaxRequest"
        ClientEvents-OnResponseEnd="responseEnd"
>
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rdAMErroredRecords">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlErrorRecords" LoadingPanelID="lpnlErrorRecords" />
                    <telerik:AjaxUpdatedControl ControlID="rdgErroredRecords" LoadingPanelID="lpnlErrorRecords" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>



server Side Code:

 protected void rdAMErroredRecords_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
    {
        if (e.Argument == "InitialPageLoad")
            GenerateHTMLReportForErroredRecords();
    }


Please help me on this.

Thanks and Regards!
chithuraj.j

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 25 Apr 2011, 09:33 AM
Hello chithuraj,

Please try setting the AsyncPostBackTimeout property of the ScriptManager/RadScriptManager in order to  define the timeout period.

I hope this helps.

Kind regards,
Mira
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Ajax
Asked by
chithuraj
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or