Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
Error adding HTML 5 Grid in SharePoint web part page
posted
Actually we are trying to use Infragistic HTML 5 Grid in SharePoint 2010 web part. However including all the required JS files for the HTML 5 Grid in web part breaks the SharePoint ribbon. We are getting few javascript errors.
 Message: Sys.InvalidOperationException: 'on' is a reserved name that can't be used as an enum value name.
Line: 2320
Char: 46
Code: 0
URI: http://mdt831:1122/ScriptResource.axd?d=H-yJNDj8hWgaeO43hmQqbO14o2ZRwbP5Ftg3iDbWD0oE21xqDrguS8veXVYmttnL68NlZWjY6frZ2ejxfi6lfeD3Khi951viJ2pTYDAPTwA1&t=ffffffffec2d9970
 
 
Debugging the issue via IE developer we found that some code of the JQuery (ig.ui.min.js) clashes with SharePoint javascript. Because of this issue even the SharePoint ribbon breaks i.e. it gets disabled.
 
However the grid gets displayed properly if we are adding the Grid control directly to the plain ASPX layouts page (no SP Ribbon). 

 

Any feedback or guidance will be appreciated. Thanks.

Parents Reply Children
  • 6279
    Suggested Answer
    posted in reply to Markus Herm

    Hi Markus,

    Our developers have resolved the blocking issues that the Ignite UI controls had with SharePoint.
    If you get the latest Service Release for Ignite UI 2012.2 from the "
    Keys and Downloads" section of your account, there should no longer be any problems such as JS exceptions or such.

    However, there are a few very important details that I'd like to make note of:

    The Ignite UI controls are adding functions to the JavaScript Array and Function prototypes. These functions are then used by all controls. Adding the functions to the array is made for performance reasons: this is the fastest way of reaching them (the functions). We've tried other alternative approaches, but unfortunately all of them caused us to sacrifice performance which is not an acceptable trade-off.
    Thus, we add the necessary functions using the best way possible: using Object.defineProperty.
    This way these functions will not be enumerated as members of an Array (by a for-in/for-each cycle which SharePoint's JS scripts uses from time to time).

    Unfortunately, as you can see from the foot note on Object.defineProperty:
    [1] In Internet Explorer 8 Object.defineProperty only accepts DOM objects (MSDN reference).       

    So the problem remains only for Internet Explorer 8.
    The problem is that SharePoint enforces IE to go to 8 compatibility view.

    So there could still be problems with Ignite UI controls under IE8 when for-in/for-each cycles are used, but that's a downside we've decided to accept. 

    In case you need full compatibility with IE8 or rather - with SharePoint (and it's muff JS scripts), I'd suggest using our SharePoint widgets instead. 

    Hope this helps,
    Borislav