User (Old forums)MemberAugust 13, 2008 at 1:47 pmPost count: 23064
I am using an unbound xceed grid for displaying information gathered about a series of systems. The code gathering the information is being excecuted on another thread, but any updates to the grid are being invoked on the UI thread. If I let the process run without touching the window while it is running, the process runs properly, however if I attempt to scroll the grid while the background process is running: I get this error when the grid updating method calls grid.EndInit:
Message=”The paint index cannot be equal to -1 when the row is initialized. Parameter name: paintIndex Actual value was -1.”
at Xceed.Grid.PaintManager.SetFirstVisibleBodyRow(Row row, Int32 paintIndex) at Xceed.Grid.PaintManager.ChangePaintableRowState(Row changedRow, DetailGrid changedRowParentGrid, Boolean changedRowIsInFixedHeaderFooter, Boolean paintable, Row previousPaintableRow, Row nextPaintableRow, Boolean previousNextRowCalculated) at Xceed.Grid.GroupBase.UpdatePaintableStateOfAllRowsOnVisibleChanged(Boolean newPaintable, Row previousPaintableRow, Row nextPaintableRow) at Xceed.Grid.Collections.StructuredDetailGridList.ClearWithoutRaisingEvent(Boolean parentDataRowPaintable, MasterGrid rootGrid) at Xceed.Grid.DetailGrid.UpdateDetailGridsOfMySelfAndSyncronizedChild() at Xceed.Grid.DetailGrid.UpdateDetailGrids() at Xceed.Grid.DetailGrid.EndInit() at Xceed.Grid.MasterGrid.EndInit() at Xceed.Grid.GridControl.EndInit() at SunGard.Pentamation.Hosting.Framework.HMSTasks.Executioner.DataViewerForm.UpdateDetailGrids() in C:\SPS Projects\HostingFramework-v3.5\Source\Framework.Tasks\TaskExecutioner\DataViewerForm.vb:line 195
I have confirmed that the all of the grid update methods are being called on the grid’s thread, so this is not a multi-thread update issue (or so I think). Any help would be greatly appreciated.
Imported from legacy forums. Posted by Scott (had 783 views)User (Old forums)MemberAugust 13, 2008 at 5:07 pmPost count: 23064
We can’t see what it can be, apart form the grid being accessed from another thread. Remember that the source to which the grid is bound must not be modified from another thread either (e.g DataSet, array list, etc..).
Imported from legacy forums. Posted by André (had 286 views)User (Old forums)MemberAugust 14, 2008 at 11:40 amPost count: 23064
Thanks for the quick response! I changed my code to execute all on the UI thread, and I am still getting the paint error if I am scrolled to the bottom of the grid while the UpdateDetailGrids method is called.
Imported from legacy forums. Posted by Scott (had 308 views)
- You must be logged in to reply to this topic.