I have a WebCombo control on a web page. The combo box is removed from control collection after responding to an ajax call. The full page is not re-populated. However, the igtbl_onBodyResize function is still called after the webcombo is removed.
Since this WebCombo is removed from the collecion, the property of "MainGrid" is null and the grid object of WebCombo only contains dispose() method. The javascript returns errors at this line "if(!grid || !grid.MainGrid.parentNode)" in this situation. What can I do to solve this problem?
I suggest that you simply hide the WebCombo in this circumstance, rather than remove it from the controls collection altogteher.
The combo needs to hook in to a number of client-side events, such as the body's onresize event, and these connections aren't removed if you remove the combo from the page during an AJAX callback.
By hiding the combo instead of removing it, the user will no longer see it, and though its events will still process it'll likely use up less processing power than trying to unhook all of these event handlers.