Hi,
Is there a way to permanently disable the horizontal scroll bar in a XamDataGrid when the AutoFit is turned on?
Thanks,
Kyle
Hello,
I am still not able to reproduce the described behavior. Please find the attach sample with the snippet you send me. Could you please confirm that the issue is still reproducible. Could you please provide me also with more details about the DataSource you use and which operational system. The other approach I can suggest is to style ScrollViewer instead of RecordListControl like this:
<Style TargetType="ScrollViewer" >
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
<Setter Property="VerticalScrollBarVisibility" Value="Visible"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollViewer}">
<Grid>
<ScrollContentPresenter
CanContentScroll="False"
Content="{TemplateBinding Content}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
I hope this help you better.
Here is the code snippet
<Style TargetType="{x:Type igDP:RecordListControl}">
<ControlTemplate TargetType="{x:Type igDP:RecordListControl}">
<ScrollViewer RenderTransform="{TemplateBinding FixedNearElementTransform}"
CanContentScroll="False" Focusable ="false" HorizontalScrollBarVisibility
="Hidden" VerticalScrollBarVisibility="Visible">
<ItemsPresenter RenderTransform="{TemplateBinding ScrollableElementTransform}"/>
</ScrollViewer></ControlTemplate>
We have also added custom scrollviewer
<Style x:Key="customScrollViewer" TargetType="{x:Type ScrollViewer}">
It only shows when AutoFix="True" and window is maximized.
here how we use it
EclpGrid extended from XamdataDrid
<
="True" >
>
="True" />
Hello rcs1087,
After adding the Alex’s snippet and setting the HorizontalScrollBarVisibility property to “Hidden” and CanContentScroll to “false” I am no longer able to represent the horizontal scrollbar, so could you please provide me a small sample where the issue is reprducible.
Thanks in advance.
I am facing the same issue and it is not resolved by the solution you have gave.
Please assist.
To disable the scrollbar functionality I can suggest you review the following forum thread which discusses the similar topic:
http://news.infragistics.com/forums/p/26940/99318.aspx#99318 .
In order to fulfill your requirements I can suggest you modify the AlexFidanov’s Xaml snippet, so the HorizontalScrollBarVisibility is set to “Hidden” and CanContentScroll is set to “false”.