Home Forums WPF controls Xceed DataGrid for WPF Problem with fixed headers changing columns visibility

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


    i filled fixed headers of a deriver DataGridControl, with my own control (eg: MyControl).

    Using VisualTreeHelper I find out MyControl istance and manage some events adding the proper handlers to this instance.

    When i set the “visibility” property of a column to “false” (probably the fixed headers are reset and repainted) i lose all my handlers (i suppose another instance of MyControl was created), then i need to call again the routine that use the VisualTreeHelper to re-find out the MyControl instance and re-Link all events handlers.

     The problem is: where do i have to put this routine? I need something like an event handler to override, for example OnFixedHeadersUpdated and so on….. I tried with the VisibilityColumns collection change event, but it is fired up before the fixed headers are updated.



    Imported from legacy forums. Posted by Matteo (had 610 views)

    Xceed Support
    Post count: 5658

    The FixedHeader and FixedFooters regions are effectively cleared when changing the Visible columns.

    What I suggest to workaround this issue is register a handler on the “Loaded” event of the MyControl placed in the FixedHeaders and to perform your registration in this handler:

           <local:MyControl Loaded=”OnMyControlLoaded” />

    Imported from legacy forums. Posted by Marcus [Xceed] (had 1039 views)

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