TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Roberto Salemi
NA
146
142.1k
[WPF] How show vertical scrollbar in DataGrid 'fullwidth'
May 5 2015 7:04 AM
Hi,
I have this code:
<Grid VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- Toolbar Command -->
<StackPanel Orientation="Horizontal" Margin="0,0,0,0" Visibility="Visible" Grid.Row="0">
[MY CONTENT]
</StackPanel>
<StackPanel Grid.Row="1">
<DataGrid Name="dgSample" --MY PROPERTY--
ScrollViewer.CanContentScroll="True"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto">
<DataGrid.Columns>
...
</DataGrid.Columns>
</DataGrid>
</StackPanel>
</Grid>
In Grid:
- first row has height 50
- second row has full height for to view data in fullwith mode
As I have set the height datagrid as I can see the vertical scrollbar into DataGrid?
Thanks.
Reply
Answers (
2
)
Vertical scrollbar in Datagrid
Create a base window in WPF