Home Forums WPF controls Xceed DataGrid for WPF Setting FixedHeaders in a Style with 2.0

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


    I have just switched my application to use the new version of the DataGrid (2.0) and have noticed that the Fixed Headers stuff works a bit differently than it used to. In the past I would use something like the snippet below to set the style for each datagrid in my application:

    <XceedDataGridMarkup:ClearHeadersFooters />
    <XceedDataGrid:ColumnManagerRow />

    However, I would like to set this in a style at the application level using something like:

    <Style x:Key=”{x:Type XceedDataGridViews:TableView}” TargetType=”{x:Type XceedDataGridViews:TableView}”>
    <Setter Property=”UseDefaultHeadersFooters” Value=”True” />
    <Setter Property=”ShowRowSelectorPane” Value=”False” />
    <Setter Property=”FixedHeaders”>
    <XceedDataGrid:ColumnManagerRow AllowSort=”True”
    <Setter Property=”Theme” >
    <XceedDataGridViews:AeroNormalColorTheme />

    This causes the compiler error:

    The Property Setter ‘FixedHeaders’ cannot be set because it does not have an accessible set accessor.

    Is this supposed to be supported? Is there a way for me to globally turn on/off grouping controls and column managers?


    Imported from legacy forums. Posted by Baldy (had 3053 views)

    Xceed Support
    Post count: 5658

    Hi Ryan,

    It is not possible to set the FixedHeaders collection via a style. That said, if you want to update your code to v2.0, it would look like the following:

    <xcdg:TableView UseDefaultHeadersFooters=”False”>

    Imported from legacy forums. Posted by Jenny [Xceed] (had 3169 views)

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