We experienced an odd bug after upgrading from a 2010 version of the Telerik ASP.NET AJAX controls to the latest 2012 version (the most recently released hotfix). I kept getting an “Object reference not set to an instance of an object.” error in RadComboBox.OnInit event, created from the GridPagerItem of the RadGrid. Strangely enough, I really couldn’t get any insight into the problem because of no stacktrace. So I began my day-long investigation into the problem, starting by first downloading the source code, adding it to the solution temporarily (so I could get into debugging it), and ran the code again. This helped me to identify which grid was causing the problem, and look at some of the reasons why it may be so. This was beneficial because I did notice on that grid, the pager was invisible. Turning on the pager seemed to resolve the issue, however, this wasn’t the solution elsewhere.

I later on played with the application by adding and removing features from the grid, and eventually found out it was due to some code attached to the PreRender event on the grid. The code did this:

Hide columns not supposed to be shown
Set the width of the grid
Rebind the grid

Unfortunately, this was the cause of the issue, and refactoring the code around solved the problem.