Disabling GridView does not work

5 posts, 0 answers
  1. W
    W avatar
    17 posts
    Member since:
    Aug 2014

    Posted 31 Aug Link to this post

    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)

  2. Patrick
    Admin
    Patrick avatar
    172 posts

    Posted 31 Aug Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. W
    W avatar
    17 posts
    Member since:
    Aug 2014

    Posted 01 Sep in reply to Patrick Link to this post

    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

  5. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 05 Sep Link to this post

    Hello Bons,

    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.
  6. W
    W avatar
    17 posts
    Member since:
    Aug 2014

    Posted 05 Sep in reply to Dilyan Traykov Link to this post

    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.

Back to Top
UI for WPF is Visual Studio 2017 Ready