This is a migrated thread and some comments may be shown as answers.

Disabling GridView does not work

4 Answers 67 Views
GridView
This is a migrated thread and some comments may be shown as answers.
W
Top achievements
Rank 1
W asked on 31 Aug 2016, 09:42 AM

Hi,

When you disable the Gridview (DataGridView.Enabled = false) the scrollbars are still there, everything is still enabled.

Only the user is not able to click on the element.

This is not according to the Microsoft guidelines. I would expect that the element is grayed out, and the scrollbars should be hidden automatically.   (bug)

4 Answers, 1 is accepted

Sort by
0
Patrick | Technical Support Engineer, Senior
Telerik team
answered on 31 Aug 2016, 07:35 PM
Hi W Bons,

I've attached a project with a Disabled RadGridView which illustrates the correct behavior.  The RadGridView and scrollbar are greyed out.  I would recommend contributing to our feedback portal with your idea of hiding the scrollbar when the RadGridView is disabled.

I hope this clears things.

Regards,
Patrick
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
W
Top achievements
Rank 1
answered on 01 Sep 2016, 06:10 AM

Hi Patrick,

 

Thanks for your reply. Sometimes I have the idea that the way thinks are implemented could have some extra attention to get them at the level of a control that is usable directly without having to perform a lot of actions to get it working the way the world works... Just my 2 cents. Adjusting controls to the way it should work costs us a lot of time. We want to prevent this.

Just like I mentioned that the calendar/scheduler should also work with Islamic calenders. If you build something, it should work for all cases. But due to the fact you cannot build everything, this is probably not going to be build in your calendar/scheduler and leaving us with a problem....

 

Regards and have a nice day

0
Dilyan Traykov
Telerik team
answered on 05 Sep 2016, 10:49 AM
Hello ,

Although we are constantly working on updating our controls and providing the best user experience, we cannot guarantee that each scenario will be covered out of the box.

In this case, however, in order to achieve the desired behavior, you can use the following style triggers:

<Grid.Resources>
    <Style TargetType="telerik:RadGridView" BasedOn="{StaticResource RadGridViewStyle}">
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"></Setter>
                <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"></Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
</Grid.Resources>

Please let me know if this will work for you.

Regards,
Dilyan Traykov
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
W
Top achievements
Rank 1
answered on 05 Sep 2016, 01:13 PM

Hi,

thanks for you help.

We did something like this, but disabling a grid, should have the functionality inside to hide the scrollbars...
that is my opinion ;)

 

Regards.

Tags
GridView
Asked by
W
Top achievements
Rank 1
Answers by
Patrick | Technical Support Engineer, Senior
Telerik team
W
Top achievements
Rank 1
Dilyan Traykov
Telerik team
Share this question
or