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

Rad Grid height shrinks after AJAX call

1 Answer 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bibhudutta
Top achievements
Rank 1
Bibhudutta asked on 19 Mar 2014, 08:58 AM
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 ?

1 Answer, 1 is accepted

Sort by
0
Bibhudutta
Top achievements
Rank 1
answered on 21 Mar 2014, 02:06 PM
We solved the issue by applying this, to our pages :

#vMain {
    height: 100% !important;
}
Tags
Grid
Asked by
Bibhudutta
Top achievements
Rank 1
Answers by
Bibhudutta
Top achievements
Rank 1
Share this question
or