Hello.
I have UltraGrid and UltraDropdown on form. UltraDropDown is used to display the list of values for a specific cell in row. When I dropdown the list for the first time, everything is OK. If I do it again, I get the following exception:
System.InvalidCastException: Unable to cast object of type 'Infragistics.Win.UltraWinGrid.UltraDropDown' to type 'Infragistics.Win.UltraWinGrid.UltraGrid'. at Infragistics.Win.UltraWinGrid.UltraGridBand.FitColumnsToWidth(Int32 right) at Infragistics.Win.UltraWinGrid.ViewStyleBase.FitColumnsToWidth() at Infragistics.Win.UltraWinGrid.BandsCollection.CalculateBandMetrics(Int32 pass) at Infragistics.Win.UltraWinGrid.BandsCollection.CalculateBandMetrics() at Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetricsHelper()
...
Programming steps:
1) Set the ValueList of a cell to UltraDropDown object in grid's IntializeLayout
2) In grid's BeforeEnterEditMode, I populate DataSource with data from database according to values set in another cells in that row (dynamic list) and set this new DataSource to UltraDropDown
This works perfect when droping down the box for the first time. When droping down the box for the second time, exception occurs. This behaviour started to appear after upgrade from 2008 Vol.2 to 2009 Vol.1
Thanks in advance for any help.
Problem identified. It is realated to AutoFitStyle set to ExtendLastColumn BUG and shoud be addressed in the next service release.