Disable selected cell highlight.

10 posts, 1 answers
  1. Clint Singer
    Clint Singer avatar
    133 posts
    Member since:
    Oct 2012

    Posted 04 Nov 2009 Link to this post

    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
  2. Answer
    Kalin Milanov
    Admin
    Kalin Milanov avatar
    447 posts

    Posted 05 Nov 2009 Link to this post

    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.
  3. DevCraft banner
  4. Ulrich Fiege
    Ulrich  Fiege avatar
    62 posts
    Member since:
    Sep 2005

    Posted 04 Mar 2010 Link to this post

    hello,
    nice sample but how can i use it in different forms and put this in the app.xaml to declare it only once.
  5. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 05 Mar 2010 Link to this post

    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.
  6. Dan R
    Dan R avatar
    9 posts
    Member since:
    Mar 2010

    Posted 18 Apr 2011 Link to this post

    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.
  7. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 18 Apr 2011 Link to this post

    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
  8. Dan R
    Dan R avatar
    9 posts
    Member since:
    Mar 2010

    Posted 18 Apr 2011 Link to this post

    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.


  9. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 18 Apr 2011 Link to this post

    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
  10. Dan R
    Dan R avatar
    9 posts
    Member since:
    Mar 2010

    Posted 18 Apr 2011 Link to this post

    Ok now I understand what you meant. This works. Thanks a lot.
  11. Tim
    Tim avatar
    18 posts
    Member since:
    Jul 2013

    Posted 26 Jan Link to this post

    I created a feedback item about this issue. You might want to vote.
Back to Top
DevCraft banner