I have a column with a conditional Template, which changes the value of the column cell if one of the OTHER values in the row equals true/false. It looks a bit like this:
{{if ${IsValueWithheld} == true}} <span class='waiting-auth-label'>Waiting for authorisation</span> {{else}} ${Value} {{/if}}
Upon the *first* expansion, Chrome logs an error to the console, saying:
Uncaught Error: An error has occurred while trying to retrieve data source property: ${IsValueWithheld}
A second click of the row expansion button expands the row as expected, showing the child records. However it leaves the ajax loading spinner running at the bottom of the grid.
Chrome/Firefox fault, IE10 doesn't care about this, it overlooks the error and just expands it. Firefox actually shows two ajax loading animations, and removes the +- glyph until the second click.
Haha beginning to regret "doing the website" now :P
Any ideas? Thanks, Tom
Upon further investigation I've found the following:
By using a function to automatically expand the first row, the template doesn't complain.
Therefore it ONLY throws an error when manually clicking the Row Expansion + button.
Any reason for that? Is it trying to evaluate the Template expression early?
Tom
Ok I've got some further information on this.
I've downgraded jQuery and jQuery UI to 1.8.2 and 1.9.0.
The error is now:
Uncaught TypeError: Cannot call method 'css' of undefined infragistics.ui.grid.framework.js:25$.widget._hideMultiHeaderCells infragistics.ui.grid.framework.js:25(anonymous function) jquery-ui-1.9.0.min.js:5$.widget._detachColumn infragistics.ui.grid.framework.js:25(anonymous function) jquery-ui-1.9.0.min.js:5(anonymous function) infragistics.ui.grid.framework.js:25p.extend.each jquery-1.8.2.min.js:2$.widget._setHiddenColumns infragistics.ui.grid.framework.js:25(anonymous function) jquery-ui-1.9.0.min.js:5$.widget._renderData infragistics.ui.grid.framework.js:25(anonymous function) jquery-ui-1.9.0.min.js:5p.isFunction.f jquery-1.8.2.min.js:2$.ig.DataSource.$.ig.DataSource.Class.extend._invokeCallback infragistics.js:51$.ig.DataSource.$.ig.DataSource.Class.extend.dataBind infragistics.js:51$.widget.dataBind infragistics.ui.grid.framework.js:25(anonymous function) jquery-ui-1.9.0.min.js:5$.widget._create infragistics.ui.grid.framework.js:25(anonymous function) jquery-ui-1.9.0.min.js:5e.Widget._createWidget jquery-ui-1.9.0.min.js:5$.widget._createWidget infragistics.ui.grid.framework.js:25(anonymous function) jquery-ui-1.9.0.min.js:5e.(anonymous function).(anonymous function) jquery-ui-1.9.0.min.js:5(anonymous function) jquery-ui-1.9.0.min.js:5p.extend.each jquery-1.8.2.min.js:2p.fn.p.each jquery-1.8.2.min.js:2e.fn.(anonymous function) jquery-ui-1.9.0.min.js:5a.widget._toggleInternalAsync infragistics.js:398(anonymous function) jquery-ui-1.9.0.min.js:5(anonymous function) infragistics.js:398
Using AutoGenerateLayouts(false) and specifying .ColumnLayouts(l => l.For(x => x.Results) etc produces the error.
Using AutoGenerateLayouts(true) doesn't.
Also, using .InitialExpandDepth(1) expands all the rows and causes no errors even after collapsing and expanding.
What's going on here?