RL
Ricky Ling
July 18, 2008 09:10 PM UTC
We are experiencing this exception. Can this be fixed and provide us with any solution or patch? Please see stack trace below:
2008-07-15 09:16:00,302 [UI Thread] ERROR CapGroup.Etp.Client.View.Common.Grids.EtpGrid - Exception Caught in OnSourceListRecordChangedHandler - RecordChangedEventArgs { RaiseDisplayElementChanged=False, SortedPositionChanged=True, VisibilityChanged=False, GroupsChanged=False, Record=(GridRecordWithValueCache): ReutersSymbol = TII, AssetName = TELMEX INTERNACIONAL SAB DE CV L ADR, BrokerCode = FBNY, TradeBy = LPM, MgrAbbrs = DIF, IFC, LBT, MiDTP, MiLBT, Mirr, NZK, RNH, RPCOM, AuthorizationPrice = 14.74, DisplayLimitPrice = 21, OpenQuantity = 2260300, CompleteQuantity = 9200, AveragePrice = 14.5306641304348, LeavesQuantity = 2251100, Last = 14.58, PercentChange = -2.8, Volume = 354514, PercentComplete = 0.407025616068663, LocationCode = LAT, PriorityCode = B, Tradability = True, MarketCapTypeImage = , CancelFlagImage = , ConfirmFlagImage = , RejectFlagImage = , NotesFlagImage = System.Drawing.Bitmap, DisplayRestrictionPercent = 4.52349488416401, DisplayDirectionsPercent = 25.8588767006529, DisplayPimPercent = , WorkingOrderStatusStr = , USDValue = 32955174, TradeSeparatelyFlagImage = , Bid = 14.57, Ask = 14.59, BidAskSize = 5 x 5, TickImage = System.Drawing.Bitmap, Change = -0.42, USDPrice = 14.58, LastUpdate = 7/15/2008 9:15:57 AM, PercentCompleteNonHold = 0.407025616068663, PendingStatusStr = , BlotterName = Default, CountryCode = MX, CurrencyCode = USD, DisplayAvailableQuantity = 2233848, Region = LATIN AMERICA, CompanyWarnPrice = 15.477, CompanyStopPrice = 16.214, WorkingQuantity = 17252, NonWorkingQuantity = 2233848, HoldQuantity = 0, BuySellCode = B, CgSymbol = TII, CrossingNetWorkShares = 2233848, CrossingNetWorkPrice = 21, CrossingNetWorkSharesState = SystemDefault, CrossingNetWorkPriceState = SystemDefault, IsinNumber = US8796901051, CusipNumber = 879690105, SedolNumber = B39STJ7, BloombergId = TII US, BrokerShortName = CS, NY, BuddySortIndex = 1, StatusCode = ASGN, BrokerAvgPrice = 14.5307, BrokerCompQty = 9200, AveragePriceHeatMapStateInt = 0, NonHoldQuantity = 2260300, DisplayTradeOrderId = 604585435, TradeOrderOca = , WorkingOrderId = , WorkingOrderOca = , AssetIdSideTraderBlotterString = 88334200|B|LPM|0, BrokerIdAssetIdSideTraderBlotterString = , OrderGroupBrokerIdAssetIdSideTraderBlotterString = , BrokerId = , OrderGroupId = , LockedBy = , LockedQty = 0, ReservedQty = 0, OpenPercentAdv = , AvailablePercentAdv = , LastClose = 14.75, Pending = False, MDCurrency = USD, BidMMID = NYS, AskMMID = NYS, High = 14.7, Low = 14.41, Open = 14.7, Close = , ExDividend = , VMA50D = 0, VWAP = , ##parent = , Group=, AddedGroup=, RemovedGroup=, Action=Changed, NewIndex=6, OldIndex=-1 }
System.ArgumentOutOfRangeException: Count = 20 FilteredRecordCount = 0 YAmountCount = 0 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0 out of range Count = 19 FilteredRecordCount = 12 YAmountCount = 382 ElementCount = 29 RecordCount = 27 CustomCount = 0 VisibleCustomCount = 0
Parameter name: searchPosition
at Syncfusion.Collections.BinaryTree.TreeTableWithCounter.GetEntryAtCounterPosition(ITreeTableCounter start, ITreeTableCounter searchPosition, Int32 cookie, Boolean preferLeftMost)
at Syncfusion.Collections.BinaryTree.TreeTableWithCounter.GetEntryAtCounterPosition(ITreeTableCounter searchPosition, Int32 cookie, Boolean preferLeftMost)
at Syncfusion.Grouping.Internals.ElementTreeTable.GetEntryAtCounterPosition(ITreeTableCounter searchPosition, Int32 counterKind, Boolean leftMost)
at Syncfusion.Grouping.Internals.ElementHelper.GetEntryAtCounterPosition(Element el, ITreeTableCounter counter)
at Syncfusion.Grouping.Internals.ElementHelper.__FindElement(Table _table, ITreeTableCounter index, Type t, Boolean stepInNestedTables)
at Syncfusion.Grouping.RuntimeElementsInTableCollection.get_Item(Int32 index)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTable.GetTableCellStyle(Int32 rowIndex, Int32 colIndex)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.GetTableViewStyleInfo(Int32 rowIndex, Int32 colIndex)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.GetViewStyleInfo(Int32 rowIndex, Int32 colIndex, Boolean forceQueryCellInfo)
at Syncfusion.Windows.Forms.Grid.GridControlBase.GetCellRenderer(Int32 rowIndex, Int32 colIndex)
at Syncfusion.Windows.Forms.Grid.GridCurrentCell.SetPositionNoActivate(Int32 rowIndex, Int32 colIndex)
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControlOptimizeListChanged.AdjustCurrentCell(Element element, Int32 pos, Int32 visibleCount)
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControlOptimizeListChanged.HandleRemovedElement(DeleteRecordInfo dr, Boolean allowUpdate, Boolean invalidateIfVisible)
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControlOptimizeListChanged.OnGridSourceListRecordChanged(Object sender, RecordChangedEventArgs rce)
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl.OnSourceListRecordChanged(RecordChangedEventArgs e)
at CapGroup.Etp.Client.View.Common.Grids.EtpGrid.OnSourceListRecordChangedHandler(RecordChangedEventArgs e)
>Hi Dmitriy,
We regret for the delays in responding to you. The reason for the issue is that the grid tries to access the rows of hidden and accordingly accessing the GetYAmount method throws the ArgumentOutOfRangeException.
The AddNewRecordSection was returning a value of 17 (m_RowHeight was set), but then when the engine tried to get the record row within that AddNewRecordSection all RecordRows had a height of size 0. That’s when the exception occurred then when the engine was trying to step into the AddNewRecordSection and then could not find the associated record row because they all had YAmountCount = 0.
A solution would be to change the following method:
>>>>>>>>>>>Code Snippet<<<<<<<<<<<
Private Sub HideGridRows(ByVal gridTable As GridTable)
''For Each gridTableModel As GridTableModel In gridTableModels
'' AddHandler gridTableModel.QueryColWidth, AddressOf Me.TableModel_QueryColWidth
''Next
For Each element As Element In gridTable.Elements
If TypeOf element Is IGridRowHeight Then
CType(element, IGridRowHeight).RowHeight = 0
If TypeOf element.ParentRecord Is AddNewRecord Then
CType(element.ParentRecord, IGridRowHeight).RowHeight = 0
End If
End If
Next
End Sub
>>>>>>>>>>>Code Snippet<<<<<<<<<<<
This explicitly will also set the height of the AddNewSection when you change its recordrows. That why the height of the AddNewRecordSection and the height of its record rows are the same.
Best regards,
Haneef