Have very simple setting :
<body> <div id="auditSetCombo"></div> <script type="text/javascript"> var uoaAuditSetUpController = function () { function bindAuditSetCombo() { var auditsDDwn = JSON.parse('[{"AuditId":0,"AuditName":"unassigned"},{"AuditId":1,"AuditName":"Audit_32513_1"},{"AuditId":2,"AuditName":"Audit_32513_2"},{"AuditId":3,"AuditName":"Audit_32513_3"}]'); $('#auditSetCombo').igCombo('option', 'dataSourceType', 'json'); $('#auditSetCombo').igCombo('option', 'dataSource', auditsDDwn); $('#auditSetCombo').igCombo('dataBind'); }
return { bindAuditSetCombo: bindAuditSetCombo }; }(); $(function () { $("#auditSetCombo").igCombo({ valueKey: "AuditId", textKey: "AuditName" }); uoaAuditSetUpController.bindAuditSetCombo(); }); </script>
</body>
when run getting the following error :
Uncaught Error: There was an error parsing the JSON data and applying the defined data schema: Cannot read property 'Metadata' of null infragistics.core.js:228
I am on 14.1 and if I would remove $('#auditSetCombo').igCombo('option', 'dataSourceType', 'json'); it would work fine... why it is not accepting 'json' type.. it works in similar circumstances in other places..
Hello mcseidel,
Thank you for posting in our community!
I would like to inform you that igCombo was improved and rewritten in version 14.2 . This means that all other older versions are considered non-supported.
I'm sending you sample with your configurations but with the latest combo version. As you can see there - no error is thrown.
Also our IgniteUI product is already open source and the latest version of the source code (of almost all of the widgets) can be found here: https://github.com/IgniteUI/ignite-ui .
That was not very helpful as the version used in the project needed to be preserved..