Skip to content

Infragistics Community Forum / Web / Ignite UI for jQuery / Cannot call methods on igGrid prior to initialization; attempted to call method 'destroy'

Cannot call methods on igGrid prior to initialization; attempted to call method 'destroy'

New Discussion
longcat
longcat asked on Feb 4, 2019 10:42 AM

Hello,

I'm trying out the ignite ui controls. When copy pasting the nestedsplitter.html example from your site, i get the following javascript error when i try to select a node in the tree:

Uncaught Error: cannot call methods on igGrid prior to initialization; attempted to call method 'destroy'

I have tried with versions  jquery >= 1.9. The version of the ignite ui im using is 13.1.20131.2143

Sign In to post a reply

Replies

  • 0
    [Infragistics] Petar Ivanov
    [Infragistics] Petar Ivanov answered on Oct 1, 2013 11:39 AM

    Hi Longcat,

    In order to check whether the igGrid has been initialized I would suggest using jQuery'sdatafunction as such:

    if ($("#gridTarget").data("igGrid") !=null) {

         //do something

    }

     

    Please note that this approach may also be applied to other components in the Ignite UI suite.

    • 0
      Edwin Stephenraj
      Edwin Stephenraj answered on May 7, 2014 12:00 AM

      I am using filter using Javascript and getting following error:

      Error: "cannot call methods on igGridFiltering prior to initialization; attempted to call method 'filter'"

      1) grid already refreshed with data (loaded)

      2) applying the filter programmatically

      function applyFilter() {

      var component = $("#Component").val();
      var attKey = $("#AttributeKey").val();
      var attValue = $("#AttributeValue").val();

      debugger;
      $("#grid").igGridFiltering('filter', ([
      {fieldName: "ComponentDesc", expr: component, cond: "contains"},
      {fieldName: "AttributeDesc", expr: attKey, cond: "contains"},
      {fieldName: "CategoryDesc", expr: attValue, cond: "contains"}
      ]));
      }

      help is much appreciated.

    • 0
      Stephen Elms
      Stephen Elms answered on Aug 31, 2015 5:12 PM

      Peter,

      I tried as you suggested, but I am still receiving the "prior to initialization" error?

      <script>function lstSourceCharacteristicValuesSearch() {
      var x = document.getElementById("sbSourceCharacteristicValues").value;
      if($("#lstSourceCharacteristicValues_table").data("igGrid")!=null) {
      $("#lstSourceCharacteristicValues_table").igGridFiltering("destroy");
      $("#lstSourceCharacteristicValues_table").igGridFiltering("filter", ([{fieldName: "lookup_display", expr: x, cond: "contains"}]));
      }
      }</script><div id="sbSourceCharacteristicValueslstSourceCharacteristicValues" style="position:abosolute; left:50px; top:625px; width:400px; height:48px; z-index:4;" class="SearchBox"><input type="text" id="sbSourceCharacteristicValues" onkeyup="lstSourceCharacteristicValuesSearch()"></div></div>
      </div>

    • 0
      Edward John
      Edward John answered on Nov 19, 2016 6:30 PM

      hey is this possible to call method after infragistic load 

      • 0
        Deyan Kamburov
        Deyan Kamburov answered on Nov 21, 2016 12:05 PM

        Hey Edward,

        All of the IgniteUI widgets have the rendered event, you can bind to it to make sure that the widget is loaded and rendered, before interacting with it.

      • 0
        Serge Lepouttre
        Serge Lepouttre answered on Feb 4, 2019 10:42 AM

        I have exactly the same problem. When I catch the rendered event and try to call igGridUpdating(X), I'm always getting "cannot call methods on igGridFiltering prior to initialization; attempted to call method X"

        Example:

        rendered: function(evt, ui) {
                        var editing = grid.igGridUpdating("isEditing");
        },

        When I place a breakpoint at "var editing", I'm hitting the breakpoint and I'm always getting "Uncaught Error: cannot call methods on igGridUpdating prior to initialization; attempted to call method 'isEditing'"

        dataSource is JSON data and showing properly in the grid. I can perfectly edit, delete, save,… But every call on igGridUpdating is failing.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
longcat
Favorites
0
Replies
6
Created On
Feb 04, 2019
Last Post
7 years, 1 month ago

Suggested Discussions

Tags

Created by

Created on

Feb 4, 2019 10:42 AM

Last activity on

Feb 16, 2026 9:32 PM