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
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.
hey is this possible to call method after infragistic load
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>
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.