Welcome to MSDN Blogs Sign in | Join | Help

workaround to the issue with the DataSheet View (if you have custom master page)

On creating a new ‘Datasheet View’ in a simple OOB Custom List or Document Library (where System master page is a custom master page) leads to either a hang (IE8) or an infinite loop (IE7)

Leading to ever growing of window height both resulting in a CPU crash.

During the script debugging found that the following are the two functions in Core.js which are going to infinite loop when custom master page with footer is present for the system pages.

GCWindowResize and GCOnResizeGridControl 

The workaround is to add counters in these two functions to overcome the infinite loop. The new functions would be as follows.

var win_resize_counter = 0;

        var obj_resize_counter = 0;

        function GCWindowResize(GCObject) {

 

            win_resize_counter++;

            if (win_resize_counter < 3) {

                if (TestGCObject(GCObject)) {

                    glGCResizeCounter = 0;

                    GCResizeGridControl(GCObject);

                }

            }

            else

                win_resize_counter = 0;

 

        }

        function GCOnResizeGridControl(GCObject) {

 

            obj_resize_counter++;

            if (obj_resize_counter < 2) {

                if (TestGCObject(GCObject)) {

                    if (glGCResizeCounter < cGCMaxGCResizeCount) {

                        glGCResizeCounter++;

                        GCResizeGridControl(GCObject);

                    }

                }

            }

            else

                obj_resize_counter = 0;

        }

For customizing the core.js in the supported way please find the below MSDN article

http://msdn.microsoft.com/en-us/library/cc768565.aspx

Published Sunday, May 31, 2009 7:21 PM by sowmyancs

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# workaround to the issue with the DataSheet View | ASP NET Hosting

# re: workaround to the issue with the DataSheet View (if you have custom master page)

Great post...just saved me hours (or possibly days) of work.

Thursday, June 11, 2009 7:38 PM by Dan Wahlin

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker