Home Forums WinForms controls Xceed Grid for WinForms Keeping columns fixed. Reply To: Keeping columns fixed.

User (Old forums)
Post count: 23064

I used to get that problem a lot. You arent calling that from a thread other than the main thread are you? I have a program where I am constantly updating the grid, and if it isnt done in a form timer, i get that error all day long.

I thought I had a fix to keeping the columns in order

While superTrim(MainGrid.FirstVisibleColumn.Title) <> “score”
MainGrid.Columns(“col1”).VisibleIndex = MainGrid.FirstVisibleColumn.VisibleIndex
MainGrid.Columns(“col2”).VisibleIndex = MainGrid.FirstVisibleColumn.VisibleIndex + 1
MainGrid.Columns(“col3”).VisibleIndex = MainGrid.FirstVisibleColumn.VisibleIndex + 2
MainGrid.Columns(“col4”).VisibleIndex = MainGrid.FirstVisibleColumn.VisibleIndex + 3
MainGrid.Columns(“col5”).VisibleIndex = MainGrid.FirstVisibleColumn.VisibleIndex + 4
End While

but now it is freezing on certain computers…

Imported from legacy forums. Posted by Mike (had 3545 views)