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

Need Scrollbars enabled while RadGridView is disabled

14 Answers 485 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Arpit
Top achievements
Rank 1
Arpit asked on 16 Mar 2011, 04:41 PM
 Hi,

I need the scrollbars of the RadGridView enabled when the RadGridView itself is disabled.

Any ideas how to do that?

Thanks

14 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 17 Mar 2011, 08:12 AM
Hello,

 Can you post more info about your scenario? For example you can apply global style for GridViewRow with desired setting(s).

All the best,
Vlad
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Arpit
Top achievements
Rank 1
answered on 17 Mar 2011, 08:17 AM
My GridView has n number of rows in it so that its vertical scrollbar is visible.

Now if GridView is disabled, scrollbar should still be enabled so that the user can scroll through the rows and can view them all.

Currently with the default implementation of Scrollbar, it gets disabled when I disable the grid.

I have a feeling that this behavior can be easily changed by altering the Template of GridView but I don't know how to do that.
0
Arpit
Top achievements
Rank 1
answered on 18 Mar 2011, 03:01 PM
Still looking for a solution...

Please let me know if my problem is not clear.

Thanks,
0
Vlad
Telerik team
answered on 18 Mar 2011, 03:08 PM
Hi,

 Have you tried to apply style for GridViewRow as I suggested in my previous reply? 

Kind regards,
Vlad
the Telerik team
0
Arpit
Top achievements
Rank 1
answered on 18 Mar 2011, 03:37 PM
Do I need to apply style for GridViewRow (or RadGridView because scrollbar belongs to RadGridView instead of GridViewRow)?
0
haagel
Top achievements
Rank 1
answered on 21 Mar 2011, 02:11 PM
I also need the scrollbars of a RadGridView to be enabled even though the RadGridView itself is disabled.

To me it seems very strange to have a style for GridViewRow for this...

Could you (Telerik) please provide some code to show how this is done?

To be very clear I have a RadGridView like this:

<telerik:RadGridView x:Name="MyGridView" IsEnabled="False" />

When my data is displayed there are to many rows so scrollbars are displayed, but they are disabled because the RadGridView is disabled. I want the scrollbars to be enabled even though the RadGrdiView is disabled.

Thanks // David
0
Vanya Pavlova
Telerik team
answered on 21 Mar 2011, 02:39 PM
Hello David,

By design when the control is disabled, scrollbars will be disabled too.
Maybe you need an enabled RadGridView , which is Readonly ?
Another alternative would be to disable just cells and leave RadGridView enabled.

Let me know which way is better for you in case you need additional assistance.

All the best,
Vanya Pavlova
the Telerik team
0
haagel
Top achievements
Rank 1
answered on 21 Mar 2011, 03:00 PM
Setting ReadOnly to true provides the behavoir I want, but not the visual look. I want the control to look disabled (grayed out) and ReadOnly doesn't do that.

Setting IsEnabled on individual cells seems like too much work. Also, sometimes I set IsEnabled="False" on a higher level (say on a UserControl containing a RadGridView and other controls) and not on the RadGridView itself. This will bubble down and the RadGridView will still be disabled (it doesn't matter if I try to set IsEnabled to true on the RadGridView).

I guess I have to find another solution...
0
Arpit
Top achievements
Rank 1
answered on 22 Mar 2011, 12:22 PM
This is not what I need. I need the RadGridView to be completely disabled except its scrollbars.
There are reasons for which I can't afford to mark it ReadOnly.
0
Arpit
Top achievements
Rank 1
answered on 30 May 2011, 07:52 PM
In the latest version of Telerik controls, While the IsEnabled of Radgridview is set to false, is it possible to scroll bars of the grid enabled?
0
Vanya Pavlova
Telerik team
answered on 30 May 2011, 07:57 PM
Hello Haagel,

 

By design when you disable RadGridView its scrollbars will be disabled as well. If you want to enable these scrollbars just create a style targeted at GridViewRow and set its IsEnabled property to False:

 

<Style TargetType="{x:Type GridViewRow}">
   <Setter Property="IsEnabled" Value="False"/>
</Style>

 



All the best,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Arpit
Top achievements
Rank 1
answered on 30 May 2011, 09:07 PM
Thanks,
It worked but the vertical scrollbar overlapps the last column. Any workaround for this?
0
Vanya Pavlova
Telerik team
answered on 31 May 2011, 02:48 PM
Hi Arpit,

 

You may set the ColumnWidth property of RadGridView to star ("*") and it will fill the available space. As an alternative you may set the Width of the last column to star and the effect will be the same.  
Then you will be able to scroll through the disabled rows of RadGridView. 


Best wishes,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Stacy
Top achievements
Rank 1
answered on 05 Feb 2013, 02:54 PM
Where does this style tag get added, in the aspx where my radgrid is?
Tags
GridView
Asked by
Arpit
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Arpit
Top achievements
Rank 1
haagel
Top achievements
Rank 1
Vanya Pavlova
Telerik team
Stacy
Top achievements
Rank 1
Share this question
or