Home Forums WPF controls Xceed DataGrid for WPF How to hide Scroll bars in DataGrid?

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

    I have a couple of DataGrids that I want to automatically grow to show the total number of rows, which works fine, but I don’t know how to hide the vertical scroll bar. Is that a way to do that?

    Imported from legacy forums. Posted by Wally (had 3478 views)

    User (Old forums)
    Member
    Post count: 23064

    Put something like this for your resource dictionary

    <Style TargetType=”{x:Type xcdg:TableViewScrollViewer}”>
    <Setter Property=”VerticalScrollBarVisibility” Value=”Hidden” />
    </Style>

    Imported from legacy forums. Posted by nat (had 1147 views)

    User (Old forums)
    Member
    Post count: 23064

    Thank you very much. That worked perfectly. The only question I have is, how do I apply it to only one grid instead of all grids?

    Imported from legacy forums. Posted by Wally (had 830 views)

    User (Old forums)
    Member
    Post count: 23064

    Never mind, I figured it out. Just had to add it to the resources of the one grid.

    <xcdg:DataGridControl >
    <xcdg:DataGridControl.Resources>
    <Style TargetType=”{x:Type xcdg:TableViewScrollViewer}”>
    <Setter Property=”VerticalScrollBarVisibility” Value=”Hidden” />
    </Style>
    </xcdg:DataGridControl>

    Imported from legacy forums. Posted by Wally (had 4028 views)

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