Home Forums WinForms controls Xceed Grid for WinForms Changing column order programatically dynamically

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

    I’m successfully setting column order in a detail grid from user saved preferences (by setting the VisibilityIndex).  The changes only occur when the grid is initialized (startup) but I can not make the changes dynamically once the grid is up.  I tried doing a gridControl.Beginit()/Endinit() around the changes but the grid doesn’t change.  What do I need to do to make the grid reflect the column order change in the detail grid?

     Thanks

    Imported from legacy forums. Posted by Bernard (had 596 views)

    User (Old forums)
    Member
    Post count: 23064

    If you make your changes to the DetailGridTemplate, then you need to call UpdateDetailGrids() on the GridControl, for the template to be taken into account AFTER the grid is already loaded.  The other option is to get the actual instance of one DetailGrid, and if the SynchronizeDetailGrids is set to true (which is default value), all the DetailGrids will update.

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

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