Session kept alive with a grid "auto" refresh

2 posts, 0 answers
  1. Doug Swanson
    Doug Swanson avatar
    5 posts
    Member since:
    Jan 2008

    Posted 13 Sep 2011 Link to this post

      I have a page that has a grid on it.  This grid is refreshed peridodically via a RadXMLHttpPanel.  The problem is that I need this auto refresh to stop when session state ends and redirect to a login page...however the auto refresh mechanism keeps the session state alive.  I thought the Ajax controls bypassed part of page life cycle and session state would expire...but it appears to be doing a full postback?  How can I get a partial page update without keeping session state alive?...and ultimately once session state is dead then to redirect to another page...Below is my script code that starts the refresh based on a js timer...

    //js script
    function startWorklistRefresh() {
                    if (wlIntervalId == 0) {
                        wlIntervalId = setInterval("reloadWorklist();", wlCtrlAutoRefreshRate);
                function reloadWorklist() {
                    $find("<%= XmlGridPanel.ClientID %>").set_value("Reload");
                function GridXmlPanel_OnResponseEnded(sender, args) {
    //aspnet markup...
     <telerik:RadXmlHttpPanel ID="XmlGridPanel" runat="server" OnServiceRequest="GridXmlPanel_OnServiceRequest"
                OnClientResponseEnded="GridXmlPanel_OnResponseEnded" EnableClientScriptEvaluation="true">
                <telerik:RadGrid id="GridWorklist" runat="server" SkinID="main" GridLines="None" style="outline: none;" OnItemCreated="GridWorklist_ItemCreated" OnItemDataBound="GridWorklistt_ItemDataBound">...
    And the xml panel event on the server side...
     protected void GridXmlPanel_OnServiceRequest(object sender, RadXmlHttpPanelEventArgs e)
                GridWorklist.DataSource = RadTechData.GetWorklist(AppUtils.CurrentFacilityID);
  2. Pero
    Pero avatar
    1156 posts

    Posted 15 Sep 2011 Link to this post

    Hi Doug,

    The RadXmlHttpPanel control is build on top of the ASP.NET and uses ASP.NET callbacks to update its content. This means there is not much we can do to work around the Session state being kept alive. I searched the internet, but didn't find any solutions as to how the to not renew the Session during ASP.NET callbacks.

    Maybe binding the RadGrid on the client will help you avoid this issue, because it retrieves its data from a WebService. Here is an example of Grid with client-side binding:

    All the best,
    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
Back to Top