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
1158
Exception on RowLayout.ColumnInfos with UnBoundColumn only with 2009.1
posted

Hi to all,

in a part of our framework we have a code that get a RowLayout from an UltraBand and refine each RowLayoutColumnInfo and add unbounded columns.

From 2006.1 to 2008.3 all works fine, unbounded cols are added and well layouted.

But with 2009.1 the same code throw exception!!! 
Analyzing in deep I found this strange behavior in RowLayout.ColumnInfos:
we are in debugger, the RowLayout was added to the Band when it had 42 bounded Columns.
Now at the the band we have added 1 unBoundColumn for a total of 43 Columns.

band.Columns.Count
43
if we ask to ColumnInfos wich is the index of our UnBoundColumn, it return 42
rowLay.ColumnInfos.IndexOf(dCol.ColKey)
42
BUT if we try to get the # 42 from the same list happens this:
rowLay.ColumnInfos[42]
'Infragistics.Win.UltraWinGrid.RowLayoutColumnInfosCollection.SynchronizeWithColumnsColection'
'rowLay.ColumnInfos[42]' threw an exception of type 'System.NullReferenceException'

For our framework there was no problem to workaround it, we can write some code to get RowLayout after all unBoundCols are added, but this feel like a bug inside a RowLayoutColumnInfosCollection.

What do you think about? It is a bug or my misuse of "new" RowLayout ?

Thanks,
Davide Dolla.

PS: this is the stackTrace

   in Infragistics.Win.UltraWinGrid.RowLayoutColumnInfosCollection.SynchronizeWithColumnsColection()
   in Infragistics.Win.UltraWinGrid.RowLayoutColumnInfosCollection.GetItem(String key)
   in Infragistics.Win.UltraWinGrid.RowLayoutColumnInfosCollection.get_Item(String columnKey)
   in Infra.Grid.XRowLayoutInfo.ApplyRowLayout(XCol arg, RowLayout rowLay)

  • 469350
    Suggested Answer
    Offline posted

    Hi,

    I agree that this does sound like a bug. There were quite a number of changes made to v9.1 in the area of RowLayouts to support the new Groups in RowLayout feature, so it's seems likely that you are right.

    Can you duplicate this in a small sample project so we can check it out?