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

Problem with style for GridView disabled state.

4 Answers 160 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paul
Top achievements
Rank 1
Paul asked on 11 Jan 2012, 09:50 PM
Hello,

I created a GridView that I fully styled and templated. Everything is working fine except when the entire GridView gets disabled either from it's IsEnabled property or when a Child Window is opened in my Silverlight application, which disables all of the controls in the window. The GridView rows lose their styling and turn white. I have been working on this problem for a few hours and I cannot find why this is happening. I am suspecting that a property is being overwritten for the GridView's disabled state, but I cannot see that in my project. How can I make sure that my grid view maintains it's row background color when it is disabled?

I am attaching two sample images to demonstrate what I am talking about.

Any help would be appreciated.

4 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 12 Jan 2012, 08:15 AM
Hello Brian,


 
We have received different requests for the behavior of RadGridView, when its IsEnabled property is set to False. By that reason we added a Rectangle element named Background_Disabled which appears when the condition is met. If you want to revert to the previous behavior you should predefine the template of RadGridView and remove this rectangle and its corresponding state. 
May you verify how this works for you? 



All the best,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Paul
Top achievements
Rank 1
answered on 12 Jan 2012, 05:30 PM
I deleted the Background_Disabled rectangle and the Disabled state from my GridView template and the problem is still there. It seems to only be changing the color of the GridViewRows. I was thinking it may be part of the PART_DataCellsPresenter which is part of the GridViewRow template. If you look back at my screen shot everything else maintains it's visual state except for the cells of the GridViewRows. When I inspect the DataCellsPresenter template I see no brushes applied to any of the elements and I also see no visual states.Is there anywhere else where this may be happening?
0
Accepted
Vanya Pavlova
Telerik team
answered on 13 Jan 2012, 03:47 PM
Hi Brian,


 
In addition to my previos reply I would like to mention that you disable cells to a GridViewCell level as well. There you may see a Border element named Background_Disabled which is reponsible for the appearance of the cell in this state. Have you defined styles targeted at GridViewCell? If that is the case it would be great if you may send to us a small repro project in a new support ticket which we may use for local testing. In this way we would be able to provide you with an appropriate solution.




Regards,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Paul
Top achievements
Rank 1
answered on 13 Jan 2012, 06:40 PM
Thank you Vanya,

I missed the GridViewCell template. Once I made a template for it and changed the Background_Disabled border everything worked as I expected. Thank you so much for your support.

-Brian
Tags
GridView
Asked by
Paul
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Paul
Top achievements
Rank 1
Share this question
or