Home Forums WinForms controls Xceed Grid for WinForms ArgumentOutOfRangeException while scrolling grid

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16360 |

    Greetings Everyone,

     

    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:

     System.ArgumentOutOfRangeException occurred
      Message=”The paint index cannot be equal to -1 when the row is initialized. Parameter name: paintIndex Actual value was -1.”
      ParamName=”paintIndex”
      Source=”Xceed.Grid”
      StackTrace:
           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
      InnerException: <None>

     

    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)
    Member
    Post 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)
    Member
    Post count: 23064

    Andre,

    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)

    User (Old forums)
    Member
    Post count: 23064

    If you are entitled to support, you can send us an email with a sample project reproducing the issue, and we will investigate this further.

    Imported from legacy forums. Posted by André (had 1064 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.