Home Forums WPF controls Xceed DataGrid for WPF Removing the Drag Feature from the Column Headers

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

    I am using the Xceed data grid in it’s simplest form… no grouping, no editing, just row selection and column sorting. However, I can still drag the column headers around (left mouse click, hold, and drag). They don’t do anything but it is a feature I would like to turn off so my user’s won’t be confused. How can I disable the dragging feature of the column headers?

    Thanks,

    Nicole

    Imported from legacy forums. Posted by Nicole (had 1055 views)

    Xceed Support
    Member
    Post count: 5658

    Set the ColumnManagerRow’s AllowColumnReorder property to false.

    <Style TargetType={x:Type xcdg:ColumnManagerRow}>
       <Setter Property=”AllowColumnReorder” Value=”False”/>
    </Style>

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

    User (Old forums)
    Member
    Post count: 23064

    I already have that in my code and I am still able to left click on the any column header and drag it around – any other suggestions???

     

    <xcdg:DataGridControl.View>

    <xcdg:TableView ShowFixedColumnSplitter=”False” ShowRowSelectorPane=”False” HorizontalGridLineBrush=”{DynamicResource Dark Grey}” VerticalGridLineBrush=”{DynamicResource Dark Grey}” UseDefaultHeadersFooters=”False” ShowScrollTip=”False”>

    <xcdg:TableView.FixedHeaders>

    <DataTemplate>

    <xcdg:ColumnManagerRow AllowSort=”True” AllowColumnReorder=”False”/>

    </DataTemplate>

    </xcdg:TableView.FixedHeaders>

    <!–<xcdg:TableView.Theme>

    <xcdg:Office2007SilverTheme/>

    </xcdg:TableView.Theme>–>

    </xcdg:TableView>

    </xcdg:DataGridControl.View>

    Imported from legacy forums. Posted by Nicole (had 620 views)

    Xceed Support
    Member
    Post count: 5658

    Unfortunately, you can just prevent the reordering of the columns. There is no method that will allow you prevent them from actually being dragged.

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

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