I'm trying to use the igGridUpdating addRow method, but it silently fails.
Here's my code:
$('#DocumentPrintOrderGrid').igGridUpdating("addRow", {'Fk_tdoc_title' : 'word up!'});
Here's my grid definition:
$(function () { $('#DocumentPrintOrderGrid').igGrid({ dataSource: '_DocumentsPrintOrder_Grid', autoGenerateColumns: false, autoGenerateLayouts: false, responseDataKey: 'Records', generateCompactJSONResponse: false, columns: [{ headerText: '<span style=\'text-align: left; display:block;\'>Document Print Order<span>', key: 'Fk_tdoc_title', width: '100px', hidden: false, dataType: 'string', formatter: null, template: '<span style=\'text-align: left; display:block;\'>${Fk_tdoc_title}</span>' }], features: [{ sortUrlKey: 'sort', sortUrlKeyAscValue: 'asc', sortUrlKeyDescValue: 'desc', name: 'Sorting', mode: 'single', type: 'local' }, { name: 'Selection', mode: 'row', multipleSelection: false }, { name: 'Resizing' }, { name: 'Selection', multipleSelection: true, mode: 'row' }], jQueryTemplating: false, autoAdjustHeight: false, width: '100%', initialDataBindDepth: 0, renderCheckboxes: true, localSchemaTransform: false });});selectionList - DocumentPrintOrder ');
hi Josh,
Thanks for the information. I've reproduced what you are describing and experienced. Unfortunately, as far as I can see, it's not something we could fix.
It's because of how the jQuery UI works. Take a look at the attached screenshot. I've pasted the debugger console stopped in :$.widget.bridge = function( name, object ) {
Since the method value and the instance are undefined it returns the grid object. The Updating widget code does not get called at all. jQuery does not return an error,
because it's saving the widget code for later use no matter if it will be used or not. Therefore you are able to call the addRow method, but that call does not get deeper and does not
reach the real addRow method in the widget.
With other words - the updating widget can not throw an error, because its (method) is not being executed.
Please let me know if I'm missing something.
Regards
Lyubo
We're including the entire infragistics.js file, not using the loader. So, unless your code explicitly throws "igGridUpdating is not a function" when the feature isn't added, we won't see any errors.
hello again,
That's strange. When I run the following code in the debugger console:
$('#grid1').igGridUpdating("addRow", {'Fk_tdoc_title' : 'word up!'});
('#grid1').igGridUpdating("addRow", {'Fk_tdoc_title' : 'word up!'});
Yes, the issue was that I didn't include the "Updating" feature. Thank you. No errors were thrown, no messages in console, nothing.
Again, it would be great if this type of thing was handled through constructor / method contracts or, at the very least, thrown errors. I'm not an api expert, but there's got to be a better way than just letting everything silently fail. I could have solved this issue in 5 minutes instead of having to post to a forum and waiting 3 days for a response.
hello,
I'm not sure if you've pasted your real sample, but I don't see in your code the Updating module enabled and configured.
If that doesn't help, could you please create and attach a live running sample?
Also do you see any javascript exceptions/warnings/errors in the javascript debugger console?
regards