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

Text turn to grey after selection

6 Answers 50 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Claude
Top achievements
Rank 1
Claude asked on 21 Feb 2017, 02:45 PM
In my grid, text is black.  When a row is selected, the text turn to grey  (that's ok).  But when I move the selection to another row, text on previously selected row remains grey (see picture).  How can I make the text turn back to black (its original color).  I looked at the visual designer but haven't find the element or attribute that is responsible for this behavior.

6 Answers, 1 is accepted

Sort by
0
Claude
Top achievements
Rank 1
answered on 21 Feb 2017, 02:51 PM
This picture might be better for your understandings
0
Claude
Top achievements
Rank 1
answered on 21 Feb 2017, 02:53 PM
Picture didn't attach in my previous email
0
Dominik
Top achievements
Rank 1
answered on 21 Feb 2017, 03:17 PM
Have you set any properties or are you just using the standard grid without changing properties ?
0
Claude
Top achievements
Rank 1
answered on 21 Feb 2017, 06:14 PM
We have a TSSP file that was created by someone else so it is possible that I need to adjust it.  However, I don't know which element or attribute I should change.  Also, I don't see that behavior in the preview pane of the Visual Style Builder.
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 22 Feb 2017, 12:55 PM
Hello Claude,

Thank you for writing.  

The provided information is not enough for me to replicate the issue locally. However, there are several possibilities that can achieve a similar result. The first one is if you have subscribed to the CellFormatting event and introduced any changes for the CellElement.ForeColor. Due to the UI virtualization in RadGridView, cell elements are created only for currently visible cells and are being reused during operations like scrolling, filtering, grouping and so on. In order to prevent applying the formatting to other columns' cell elements (because of the cell reuse) all customization should be reset for the rest of the cell elements. Additional information is available here: http://docs.telerik.com/devtools/winforms/gridview/cells/formatting-cells

Another option is if you have a custom theme. I suppose that you may have applied a fore color for the IsSelected state (or some other state) of the cell, but you don't reset the color for the normal state of the cell. Please refer to the attached screenshot. On the left side of Visual Style Builder, you should select the desired cell element. On the right side at the top select the desired element state and at the bottom right you can see the applied repositories and modify the style according to your requirement, e.g. apply a back color for the default state of the cell element. You can read more details about using the Visual Style Builder here:

1.     Loading predefined themes
2.     
Working with Repository Items
3.     
Saving and Loading Theme Files
4.     
Loading Themes from an External File
5.     
Loading Themes from a Resource
6.     
Applying Theme to a Control
7.     
http://tv.telerik.com/watch/winforms/visualstylebuilder/whats-new-visual-style-builder-q1-2010

 I hope this information helps. Should you have further questions I would be glad to help.


Regards,
Dess
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Claude
Top achievements
Rank 1
answered on 22 Feb 2017, 02:37 PM
Thanks.  I effectively adjust the theme and everything's fine now.
Tags
GridView
Asked by
Claude
Top achievements
Rank 1
Answers by
Claude
Top achievements
Rank 1
Dominik
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or