Rad Grid height shrinks after AJAX call

2 posts, 0 answers
  1. Bibhudutta
    Bibhudutta avatar
    16 posts
    Member since:
    Jan 2012

    Posted 19 Mar 2014 Link to this post

    Hi, we have an application in which we are using rad grid. We are using .NET 4.0 framework, AJAX Toolkit version - 3.0 and Telerik version - 2013.3.1114.40. We are facing a peculiar problem with grid height. At first our grids were not filling up the entire window, so we took the suggestion from here 

    http://www.telerik.com/support/code-library/setting-100-height-and-resize-on-container-resize-for-grid-with-scrolling-and-static-headers

    and modified the grid. Everything worked fine and the grids resized properly and fitted the window perfectly on initial load. But we found out that after any AJAX operation in the grid(such as new row addition or edit or save or cancel) the grid height shrinked after the load. We searched and found out that this, is a problem with MS AJAX itself. As mentioned over here 

    http://www.telerik.com/forums/grid-height-between-ajax-postback#7bKm9CY-u0K3Ymwwa978wg

    But when we applied the solution, as mentioned in the above thread that is this :

               
    Sys._ScriptLoader.getInstance()._loadScriptsInternal = function () {
          
    if (this._scriptsToLoad && this._scriptsToLoad.length > 0) {
             
    var nextScript = Array.dequeue(this._scriptsToLoad);
             
    var scriptElement = this._createScriptElement(nextScript);
             
    if (scriptElement.text && Sys.Browser.agent === Sys.Browser.Safari) {
                scriptElementscriptElement.innerHTML = scriptElement.text;
                
    delete scriptElement.text;
             }
             
    if (typeof (nextScript.src) === "string") {
                
    this._currentTask = new Sys._ScriptLoaderTask(scriptElement, this._scriptLoadedDelegate);                         this._currentTask.execute();
             }
             
    else {
                document.getElementsByTagName(
    'head')[0].appendChild(scriptElement);                                             Sys._ScriptLoader._clearScript(scriptElement);
                
    this._loadScriptsInternal();
             }
          }
          else {
              
    var callback = this._allScriptsLoadedCallback;
              
    this._stopLoading();
              
    if (callback) {
                 callback(
    this);
              }
         }
    }

    But it does not work out and throws an error at the line 
    this._stopLoading();

    The aps.net web blog says that they have fixed this in the .NET 3.5 framework release itself, but its still comming. Can anybody help me on this ?
  2. Bibhudutta
    Bibhudutta avatar
    16 posts
    Member since:
    Jan 2012

    Posted 21 Mar 2014 Link to this post

    We solved the issue by applying this, to our pages :

    #vMain {
        height: 100% !important;
    }
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top