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
725
igGrid - Error When Trying to Rebind Grid
posted

Hi everyone,

I've got an igGrid that I'd like to be able to rebind to different data sources, but I'm getting the following error in

Microsoft JScript runtime error: Unable to get value of the property 'hide': object is null or undefined

The code breaks on the following statement:

this._loadingIndicator.hide()

It's line 25, Col 79451 of infragistics.ui.grid.framework.js, immediately underneath the following header:

/*

* Infragistics.Web.ClientUI Grid 12.2.20122.2029

*

* Copyright (c) 2011-2012 Infragistics Inc.

*

* http://es.infragistics.com/

*

* Depends on:

* jquery-1.4.4.js

* jquery.ui.core.js

* jquery.ui.widget.js

* ig.dataSource.js

* ig.ui.shared.js

* ig.util.js

*/

I have attached my sample page. The first time I click on either button, I will get a grid with the appropriate columns and data. Any subsequent button-clicks fail with this error, and then the grid disappears, which is likely the result of my call to $('#placeHolder').igGrid('destroy');  (Note: In my sample, I'm only calling destroy if I've already bound the grid, because I was getting errors on my first attempt to bind when I called destroy every time.

I have also tried using $("#placeHolder").empty(); but that doesn't do the trick either.  I don't get any errors, but the grid does not re-appear.

I have also tried NOT destroying/emptying the grid, but then I get a different error: 

Microsoft JScript runtime error: Unable to get value of the property 'length': object is null or undefined

The code breaks on the following statement:

colsLength=cols.length

It's line 25, Col 10526 of infragistics.ui.grid.framework.js, immediately underneath the same header as above.

Also, my sample puts the grid inside of a DIV, because I had seen some threads that talk about bugs when building a grid inside of a TABLE element.  I'd be willing to put the grid inside of anything, as long as it'll let me rebind!

Thanks!  Let me know if there is any other information I can provide.

Jamie

Play.zip
Parents
No Data
Reply
  • 24671
    Verified Answer
    posted

    Hi Jamie,

    thanks for attaching such a great and self-explanatory sample : ) I am afraid this is an issue that we need to fix. As a workaround you can replace the placeholder type to be table instead of a div:

    <table id="placeHolder" style="width:100%"></table>

    and it will work fine. That's related to the structure of the widget & nested elements depending on the type of the element on which the grid is intantiated. If it's a table, it's wrapped with a div so that all extra UI such as the pager, etc. - gets rendered, if it's a DIV, then an extra table is created within the div, and there is some extra logic related to this ,but those are all implementation details. 

    We will update you with the work item number, so that you can track the progress by contacting DS, in case the workaround I have given doesn't satisfy your needs.

    Thanks,

    Angel

Children