Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
NullReferenceException while accessing IsExpandable property of rows of WinGrid
posted

Hi.

I am using an UltraWinGrid (v 8.2). I am binding a custom object to the grid. I have a method that loops through the rows in the grid, checks the IsExpandable property of each row and does some processing based on it. Sporadically, I get the following error message while checking the IsExpandable property. I have set in bold the part of the stack trace that is relevant after the IsExpandable property is accessed.

Even when the error happens multiple times in sucession, its on different rows.

I would appreciate any help. Thanks.

 

System

.NullReferenceException: Object reference not set to an instance of an object. at Infragistics.Win.UltraWinGrid.UltraGridRow.HasChild(UltraGridBand band, Boolean excludeHidden, IncludeRowTypes includeRowTypes) at Infragistics.Win.UltraWinGrid.UltraGridRow.get_IsExpandable() at Utility.GridUtility.GridUtility.AddRowsForXLRaw(RowsCollection rows, Int32& index, PortfolioHeading headings, Worksheet ws, String& ls, XLRawSettings settings) in C:\Karsch\tag\Release 5.0.4.0\MiddleWare\Messaging\Utility\GridUtility\GridUtility.cs:line 1807 at .........