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

Disable selected cell highlight.

9 Answers 253 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Clint Singer
Top achievements
Rank 1
Clint Singer asked on 04 Nov 2009, 11:18 PM
Hi,

Currently I am using row selection for my readonly grid.  There is a cell highlight that shows which cell the user has selected.  I would like to disable that highlight so that the row selection looks consistent no matter where on the row the user clicks.  Is there a way to do disable the cell selection highlight?

Cheers,
Clint

9 Answers, 1 is accepted

Sort by
0
Accepted
Kalin Milanov
Telerik team
answered on 05 Nov 2009, 03:37 PM
Hello Clint Singer,

To disable the highlight you will need to edit the cell template and change the background of the cell when it goes to current state. Attached I am sending you a sample application which does just that.

I hope this will solve the issue you are having.

Kind regards,
Kalin Milanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ulrich Fiege
Top achievements
Rank 1
answered on 04 Mar 2010, 11:29 AM
hello,
nice sample but how can i use it in different forms and put this in the app.xaml to declare it only once.
0
Milan
Telerik team
answered on 05 Mar 2010, 06:39 AM

Hi Ulrich Fiege,

You can do that by placing all of the resources (Styles, brushes, etc.) in the Resource section of your App.xaml. Once you do that you will be able to access those resources from every other UserControl.

foreach(var col in this.gridView.Columns)
                col.CellStyle = (Style)Application.Current.Resources["GridViewCellStyle"];



All the best,
Milan
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
Dan R
Top achievements
Rank 1
answered on 18 Apr 2011, 04:53 PM
Hi, do you guys have an updated version of this sample for Silverlight 4? It worked great in SL3 but it seems you removed the AlignmentContentPresenter in your latest library and this code no longer works. Anyway that I try to fix it so that it runs it causes the text of the cell to vanish although the highlighting seems to work correctly. Thanks.
0
Vanya Pavlova
Telerik team
answered on 18 Apr 2011, 07:02 PM
Hello Dan,

 
Indeed the AlignmentContentPresenter is obsoleted, you need to use a ContentPresenter instead.
Please give it a try and let me know if you need any further assistance.


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
Dan R
Top achievements
Rank 1
answered on 18 Apr 2011, 07:21 PM
There is no property of the radgridview control called ContentPresenter. I have tried some of the other presenters in the radgridview but none work at all.

The problem line in the xaml:

    <Telerik_Windows_Controls_GridView:AlignmentContentPresenter x:Name="PART_ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Visibility="Visible" Foreground="{TemplateBinding Foreground}" TextAlignment="{TemplateBinding TextAlignment}" TextDecorations="{TemplateBinding TextDecorations}" TextWrapping="{TemplateBinding TextWrapping}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>

Without that the whole sample falls apart. Is there any workaround? Thanks.


0
Vanya Pavlova
Telerik team
answered on 18 Apr 2011, 07:33 PM
Hi Dan,

 

Please find attached sample project which you may use for testing.
If you need any further assistance do not hesitate to contact us.



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
Dan R
Top achievements
Rank 1
answered on 18 Apr 2011, 08:01 PM
Ok now I understand what you meant. This works. Thanks a lot.
0
Tim
Top achievements
Rank 1
answered on 26 Jan 2016, 04:14 PM
I created a feedback item about this issue. You might want to vote.
Tags
GridView
Asked by
Clint Singer
Top achievements
Rank 1
Answers by
Kalin Milanov
Telerik team
Ulrich Fiege
Top achievements
Rank 1
Milan
Telerik team
Dan R
Top achievements
Rank 1
Vanya Pavlova
Telerik team
Tim
Top achievements
Rank 1
Share this question
or