Scrollbars always visible ?

Dec 12, 2013 at 5:43 PM
Hi everybody,

First of all, thanks to this magnificient control. It's a good way for having a profesional presentation for our Datagrids.

I have a problem with this control, whatever I set the VerticalScrollBarVisibility to "Disabled" or "Hidden", the vertical scroll bar is always visible on the right of the control.
!
Is there an issue about this or do I made a mistake ?

Thanks in advance for your answer !
Coordinator
Dec 12, 2013 at 5:57 PM
Hi,

Whenever there are more rows it shows vertical scrollbar otherwise it is not showing up for me.
Can you provide me your xaml?
Do you have many rows and you want to hide scroll bar or you want to always want it to be hidden?
Dec 12, 2013 at 6:04 PM
Edited Dec 12, 2013 at 6:05 PM
Hi,

Thanks for your answer.

Indeed, I would like to never display the scrollbar. And for me, it is always displayed...

Hereunder you will find the XAML for the ExtendedGrid
    <ExtendedGridControl:ExtendedDataGrid x:Name="dgSessions"
                                          HorizontalAlignment="Left"
                                          Margin="9,187,0,0"
                                          VerticalAlignment="Top"
                                          Height="164"
                                          Width="1256"
                                          ItemsSource="{Binding SessionsList}"
                                          AutoGenerateColumns="False"
                                          EnableColumnVirtualization="False"
                                          IsSynchronizedWithCurrentItem="False"
                                          GroupByHeaderText="Glisser un en-tête de colonne sur cette zone pour grouper automatiquement cette colonne."
                                          IsReadOnly="True"
                                          HeadersVisibility="Column"
                                          Background="LightSteelBlue"
                                          CanUserReorderColumns="False"
                                          CanUserResizeColumns="False"
                                          GroupByControlVisibility="Collapsed"
                                          BorderThickness="0"
                                          AllowUserToCopy="False"
                                          ClipboardCopyMode="None"
                                          EnableRowVirtualization="False"
                                          GridLinesVisibility="Vertical"
                                          VerticalScrollBarVisibility="Hidden"
                                          HorizontalScrollBarVisibility="Hidden"
                                          SelectionMode="Single">
        <ExtendedGridControl:ExtendedDataGrid.Resources>
            <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
                             Color="LightSteelBlue" />
        </ExtendedGridControl:ExtendedDataGrid.Resources>
        <ExtendedGridControl:ExtendedDataGrid.CellStyle>
            <Style TargetType="{x:Type Controls:DataGridCell}">
                <Setter Property="BorderThickness"
                        Value="0" />
            </Style>
        </ExtendedGridControl:ExtendedDataGrid.CellStyle>
        <ExtendedGridControl:ExtendedDataGrid.Columns>
            <ExtendedColumn:ExtendedDataGridTextColumn Header="Date de Début"
                                                       AllowAutoFilter="False"
                                                       Width="100"
                                                       Binding="{Binding ses_start_time, StringFormat=dd/MM/yyyy}">
                <ExtendedColumn:ExtendedDataGridTextColumn.CellStyle>
                    <Style TargetType="Controls:DataGridCell">
                        <Setter Property="Block.TextAlignment"
                                Value="Center" />
                    </Style>
                </ExtendedColumn:ExtendedDataGridTextColumn.CellStyle>
            </ExtendedColumn:ExtendedDataGridTextColumn>
            <ExtendedColumn:ExtendedDataGridTextColumn Header="Date de Fin"
                                                       AllowAutoFilter="False"
                                                       Width="100"
                                                       Binding="{Binding ses_end_time, StringFormat=dd/MM/yyyy}">
                <ExtendedColumn:ExtendedDataGridTextColumn.CellStyle>
                    <Style TargetType="Controls:DataGridCell">
                        <Setter Property="Block.TextAlignment"
                                Value="Center" />
                    </Style>
                </ExtendedColumn:ExtendedDataGridTextColumn.CellStyle>
            </ExtendedColumn:ExtendedDataGridTextColumn>
            <ExtendedColumn:ExtendedDataGridTextColumn Header="Ville"
                                                       AllowAutoFilter="False"
                                                       Width="300"
                                                       Binding="{Binding Ville.vil_name}" />
            <ExtendedColumn:ExtendedDataGridTextColumn Header="Plan d'eau"
                                                       AllowAutoFilter="False"
                                                       Width="300"
                                                       Binding="{Binding Plan_eau.pea_name}" />
            <ExtendedColumn:ExtendedDataGridTextColumn Header="Départs"
                                                       AllowAutoFilter="False"
                                                       Width="80"
                                                       Binding="{Binding Prises.Count}" />
            <ExtendedColumn:ExtendedDataGridTextColumn Header="Poissons"
                                                       AllowAutoFilter="False"
                                                       Width="80"
                                                       Binding="{Binding Prises.Count}" />
            <ExtendedColumn:ExtendedDataGridTextColumn Header="Photos"
                                                       AllowAutoFilter="False"
                                                       Width="80"
                                                       Binding="{Binding Prises.Count}" />
        </ExtendedGridControl:ExtendedDataGrid.Columns>
    </ExtendedGridControl:ExtendedDataGrid>
Dec 12, 2013 at 6:06 PM
Also in Design mode, you can see a "space" available to show the vertical scroll bar on the right of the grid...
Coordinator
Dec 12, 2013 at 6:13 PM
Hi,

It seems you have draged droped this grid, I can see width,Height and margin.
You should never do that, Right design would be to use grid or some panel to host this grid and grid will fit inside properly.

If you dindlt get my point share the window xaml.

Regards,
bpoojary
Dec 12, 2013 at 6:16 PM
Ok thanks for your reply. I try this immediately.

Sorry for the mistake ! I will not know
Dec 12, 2013 at 6:23 PM
Ok, I set the ExtendedGrid to be part of a Grid. No more Margin, Width or Height elements.

In the default style, the vertical scrollbar is not appear. But, it will remain a space. Is ther a way the ExtendedGrid fit the full width when there is no Vertical Scroll bar ?

Other problem, when I set Office2007Black theme, the scroll bar is always displayed... Even if I set it to Hidden or Disabled.
Dec 12, 2013 at 6:24 PM
Here the XAML for information
    <Grid Margin="10,191,10,164">
        <ExtendedGridControl:ExtendedDataGrid x:Name="dgSessions"
                                              ItemsSource="{Binding SessionsList}"
                                              AutoGenerateColumns="False"
                                              EnableColumnVirtualization="False"
                                              IsSynchronizedWithCurrentItem="False"
                                              GroupByHeaderText="Glisser un en-tête de colonne sur cette zone pour grouper automatiquement cette colonne."
                                              IsReadOnly="True"
                                              HeadersVisibility="Column"
                                              Background="LightSteelBlue"
                                              CanUserReorderColumns="False"
                                              CanUserResizeColumns="False"
                                              GroupByControlVisibility="Collapsed"
                                              BorderThickness="0"
                                              AllowUserToCopy="False"
                                              ClipboardCopyMode="None"
                                              EnableRowVirtualization="False"
                                              GridLinesVisibility="Vertical"
                                              VerticalScrollBarVisibility="Disabled"
                                              HorizontalScrollBarVisibility="Disabled"
                                              SelectionMode="Single">
            <ExtendedGridControl:ExtendedDataGrid.Resources>
                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
                                 Color="LightSteelBlue" />
            </ExtendedGridControl:ExtendedDataGrid.Resources>
            <ExtendedGridControl:ExtendedDataGrid.CellStyle>
                <Style TargetType="{x:Type Controls:DataGridCell}">
                    <Setter Property="BorderThickness"
                            Value="0" />
                </Style>
            </ExtendedGridControl:ExtendedDataGrid.CellStyle>
            <ExtendedGridControl:ExtendedDataGrid.Columns>
                <ExtendedColumn:ExtendedDataGridTextColumn Header="Date de Début"
                                                           AllowAutoFilter="False"
                                                           Width="100"
                                                           Binding="{Binding ses_start_time, StringFormat=dd/MM/yyyy}">
                    <ExtendedColumn:ExtendedDataGridTextColumn.CellStyle>
                        <Style TargetType="Controls:DataGridCell">
                            <Setter Property="Block.TextAlignment"
                                    Value="Center" />
                        </Style>
                    </ExtendedColumn:ExtendedDataGridTextColumn.CellStyle>
                </ExtendedColumn:ExtendedDataGridTextColumn>
                <ExtendedColumn:ExtendedDataGridTextColumn Header="Date de Fin"
                                                           AllowAutoFilter="False"
                                                           Width="100"
                                                           Binding="{Binding ses_end_time, StringFormat=dd/MM/yyyy}">
                    <ExtendedColumn:ExtendedDataGridTextColumn.CellStyle>
                        <Style TargetType="Controls:DataGridCell">
                            <Setter Property="Block.TextAlignment"
                                    Value="Center" />
                        </Style>
                    </ExtendedColumn:ExtendedDataGridTextColumn.CellStyle>
                </ExtendedColumn:ExtendedDataGridTextColumn>
                <ExtendedColumn:ExtendedDataGridTextColumn Header="Ville"
                                                           AllowAutoFilter="False"
                                                           Width="300"
                                                           Binding="{Binding Ville.vil_name}" />
                <ExtendedColumn:ExtendedDataGridTextColumn Header="Plan d'eau"
                                                           AllowAutoFilter="False"
                                                           Width="300"
                                                           Binding="{Binding Plan_eau.pea_name}" />
                <ExtendedColumn:ExtendedDataGridTextColumn Header="Départs"
                                                           AllowAutoFilter="False"
                                                           Width="80"
                                                           Binding="{Binding Prises.Count}" />
                <ExtendedColumn:ExtendedDataGridTextColumn Header="Poissons"
                                                           AllowAutoFilter="False"
                                                           Width="80"
                                                           Binding="{Binding Prises.Count}" />
                <ExtendedColumn:ExtendedDataGridTextColumn Header="Photos"
                                                           AllowAutoFilter="False"
                                                           Width="80"
                                                           Binding="{Binding Prises.Count}" />
            </ExtendedGridControl:ExtendedDataGrid.Columns>
        </ExtendedGridControl:ExtendedDataGrid>
    </Grid>
Coordinator
Dec 12, 2013 at 6:35 PM
Hi,

In my demo I dont see scroll bar when I set VerticalScrollbarVisibility to Hidden (In all themes).
To remove extra space at the end set Width property of any column to *.

Dont use disabled here use hidden.

For e.g.

<ExtendedColumn:ExtendedDataGridTextColumn Header="Photos"
                                                       AllowAutoFilter="False"
                                                       Width="*"
                                                       Binding="{Binding Prises.Count}" />
        </ExtendedGridControl:ExtendedDataGrid.Columns>
Regards,
bpoojary
Dec 12, 2013 at 6:40 PM
I try this without success.

On Design mode, it seems to be ok. But when I launch the application the space for Vertical bar is shown on the right...

I do not understand :(
Coordinator
Dec 12, 2013 at 6:42 PM
Remove Grid margin
Margin="10,191,10,164
Dec 12, 2013 at 6:42 PM
If I set Office2007Black theme, I always see the vertical scroll bar...
Coordinator
Dec 12, 2013 at 6:44 PM
Send me demo small project I will fix it, its not ExtendedDatagrid issue, its layouting issue.


Coordinator
Dec 12, 2013 at 6:47 PM
I will work on it tomorrow, as it is very late here, but do send me demo project.
Dec 12, 2013 at 7:12 PM
No problem.

Thanks for your help. I will try many things in layout without success. I'm newbie in WPF, I was developer in Winforms previously. Not the same way ;)

You will find a demo with source here (about 30MB sorry) : http://piscarius.fr/download/Piscarius2_demo.zip

When you launch the application, the first screen show 3 datagrid, on the center one, the vertical scrollbar is always shown on the right...

Tell me when you download the file, I will delete it from my server.

Thank you !
Dec 17, 2013 at 4:26 AM
Hi bpoojary, Did you looked at my problem?

Il try many combinations for set-up the layout without success...
Coordinator
Dec 17, 2013 at 4:40 AM
I was outside.
Will revert back today.
Dec 17, 2013 at 4:43 AM
No problem ;) Thanks for your help !
Coordinator
Dec 18, 2013 at 1:56 AM
I tried to open the solution its seems to be in 2013 format, which is not opening at my end.
Can you please send me in 2010 format?
Dec 18, 2013 at 4:07 AM
Unfortunately I do not have any version of Visual Studio 2010 available.

It's a VS 2012 project in fact.
Coordinator
Dec 21, 2013 at 6:59 AM
I will download and will try
Dec 21, 2013 at 7:03 AM
Thanks... I try again to solve this without success yesterday...
Jan 2, 2014 at 4:59 PM
I try again today without success... My scrollbar is always visible (or a blank space is displayed instead of)...

Did you have tilme to look at this problem ?

Happy New Year !
Coordinator
Jan 2, 2014 at 7:28 PM
Hi,

Happy new year to you too.
I wanted to know which file I should look for (xaml), as I dont have your version?
I will work on it now if you give me file name.

Regards,
bpoojary
Jan 3, 2014 at 7:34 AM
Sorry I don't see your message.

You can take a look at HomeDetailsView.xaml, the object dgSessions.

Regards,
Jan 3, 2014 at 11:33 AM
I have found.

In fact, there is some conflicts with a theme element that I used : CosmopolitanWPF (cosmopolitanwpf.codeplex.com). If I desinstall this theme, everything is alright.

Thanks for your help !
Coordinator
Jan 3, 2014 at 5:52 PM
Great!!!