Correcting “Object Required” error in Infragistics “this._getContainer=function()” internal code

After upgrading to NetAdvantage 9.1 my UltraWebGrid which uses a WebCombo as editor control was starting to throw “Object Required” error inside of Infragistics own JavaScript code in function “_getContainer“. After a bit of experimenting I found out that the error does not happen if I click an existing cell that uses the WebCombo to show the dropdown prior to executing the action that would cause the error.

That lead me to believe that error happens because WebCombo is not initialized in some way and clicking the cell does that initialization. So I tried to simulate that behavior programmatically, by entering and immediately exiting cell edit mode:

// to prevent error - showing and hiding dropdown
var oCell = igtbl_getCellById(sCellId)
oCell.beginEdit();
oCell.endEdit(true);

where sCellId – is ID of any existing cell that uses dropdown as an editor. And Bingo! the error went away. Also beginEdit/endEdit happen so fast, so even though technically they show and hide the dropdown – in reality nothing appears on the screen.

Leave a Reply