Disable cell border and tab to next row instead of cell

19 posts, 0 answers
  1. Missing user
    Missing user avatar

    Posted 17 Dec 2010 Link to this post

    I just upgraded from Q1 SP2 to Q2 SP1 and I noticed that when I select a cell I get an annoying border around it (Just the selected cell). After looking through some other complaints about it here I found a xaml which removes the border but when I press TAB or ALT it's still there. I tried to set all colors to alpha but it's still there. How to remove all additional cell selection/focus borders completely, I don't want it to appear ever. Please note that I don't want to remove the outer borders of the cells but the additional inner border for a cell select.

    On another note, how can I set the GridView to go to the next row on TAB instead of the next cell, I'm not interested in any cell, just the rows (Hence I also don't want the selected cell border).

    Thanks!
  2. Missing user
    Missing user avatar

    Posted 19 Dec 2010 Link to this post

    No one from support or someone else who knows this?
  3. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 20 Dec 2010 Link to this post

    Hello Marcel,

     

    To achieve the desired result you need to edit the template of GridViewCell and remove the Border element named Background_Current as well as its corresponding trigger. Please find the attached project that demonstrates this technique.

    Kind regards,
    Vanya Pavlova
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  4. Missing user
    Missing user avatar

    Posted 20 Dec 2010 Link to this post

    Hello,

    I already did that but when I press ALT or TAB I still get the border around it. I don't want this.

    Best Regards
  5. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 21 Dec 2010 Link to this post

    Hello Marcel,

     
    Please accept my apology for the initial omission. The border is still there, because there is one WPF specific property FocusVisualStyle which causes this border to appear, ignoring the fact that the border element named Background_Current is removed.

    Please change the style from my previous example in the following way:

    <Style ......>
                <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                <Setter Property="Background" Value="Transparent"/>
                <Setter Property="SnapsToDevicePixels" Value="True"/>
                <Setter Property="FocusVisualStyle"                   Value="{x:Null}">
                      </Setter>
    </Style>


     

    All the best,
    Vanya Pavlova
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  6. Missing user
    Missing user avatar

    Posted 21 Dec 2010 Link to this post

    Thanks, didn't know about that property, much appreciated!

    About my other question, is there any way to set a property of some kind to enable TAB button to go to next row instead of cell? Or do I have to code this myself?
  7. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 22 Dec 2010 Link to this post

    Hello Marcel,

     

    You need to predefine the default keyboard navigation in RadGridView as it is demonstrated in the following blog post.

    All the best,
    Vanya Pavlova
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  8. Missing user
    Missing user avatar

    Posted 22 Dec 2010 Link to this post

    Thanks, works fine!

    Another question (not worth reopening another thread for), how can I change codewise the background color or a row (I want a different color based on a value), I know it can be done XAML wise but I'd rather set it from code so I can access all variables I need for this purpose. I tried with ChildrenOfType but it didn't get anything, also ItemContainerGenerator.ContainerFromItem but that didn't get a RadGridRow from the items in the ItemsSource.
  9. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 23 Dec 2010 Link to this post

    Hi Marcel,


    You need to use Conditional styles and Templates, as demonstrated in the following blog post.
    You can also check our online "RowStyleSelectors" demo.

    All the best,
    Vanya Pavlova
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  10. Julian
    Julian avatar
    77 posts
    Member since:
    Dec 2010

    Posted 11 Oct 2011 Link to this post

    Hi,

    I'm trying to disable Focusable on my columns:
    <Style TargetType="{x:Type namespace:GridViewCell}">
         <Setter Property="Focusable" Value="False"/>
         <Setter Property="IsTabStop" Value="False"/>
         <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>

    it doesn't works for me.

    Btw. you example doesn't works too.

    Need support,
    thanks.
    Julian


  11. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 11 Oct 2011 Link to this post

    Hi Julian,

     


    Are you trying to remove the Border which appears when a cell goes into its current state or maybe I am missing something? If that is the case you cannot achieve the desired result with a simple style, you should predefine the template of GridViewCell as demonstrated in the following online help article.
    I am attaching you sample project which demonstrates how this can be achieved.




    Kind regards,
    Vanya Pavlova
    the Telerik team

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

  12. Tingting
    Tingting avatar
    14 posts
    Member since:
    May 2012

    Posted 09 May 2012 Link to this post

    Hello , 

       I have a problem with my customer MessageBox. When it is displayed, it is shown on top of my main application window,  as I would like.  But i  can always choose the controls in my main window by TAB Button which i dont want to.  Is there a way that I can force the focus to remain only on the messagebox when it is displayed ?  When it is closed, the focus will return on my main  window . 





     
     





  13. Milbrey
    Milbrey  avatar
    1 posts
    Member since:
    Sep 2013

    Posted 16 Jun 2014 in reply to Vanya Pavlova Link to this post

    is there any way to set a property of some kind to enable TAB button to go to next row instead of cell?

    Can you share the link again to your answer to this question? Seems it can no longer be found.
  14. Nick
    Admin
    Nick avatar
    593 posts

    Posted 16 Jun 2014 Link to this post

    Hello Milbery,

    Here is the link to the CustomKeyboardProvider article

    Hope it helps. 

    Regards,
    Nik
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  15. Doug
    Doug avatar
    8 posts
    Member since:
    May 2013

    Posted 06 Jan 2015 in reply to Vanya Pavlova Link to this post

    This process is going to be quite time consuming if a user works with gridviews a lot.  I would like to please ask, that this be a settable flag like selecting the entire row.  Please consider this a feature request.
  16. Nick
    Admin
    Nick avatar
    593 posts

    Posted 07 Jan 2015 Link to this post

    Hi Marcel,

    Indeed this may be a bit time consuming but adding such a property suggests adding properties for every keyboard action on a later stage, which will lead to a huge amount of boolean properties controlling specific interactions, which may interfere with each other. This is extremely hard to maintain and test and that is why we haven't done it until now, and the proper way to do it is with a custom keyboard provider. 

    Hope this makes sense. 

    Regards,
    Nick
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  17. Doug
    Doug avatar
    8 posts
    Member since:
    May 2013

    Posted 07 Jan 2015 in reply to Nick Link to this post

    I am suggesting nothing to do with the keyboard.  What I am suggesting is if I'm not using any data editing, and selecting an entire row, i probably don't want the annoying cell selection border, it serves no purpose at this point.
  18. Doug
    Doug avatar
    8 posts
    Member since:
    May 2013

    Posted 07 Jan 2015 in reply to Nick Link to this post

    The other BIG issue I have noticed with this, it is doesn't seem to be able to be used in conjunction with RadBusyIndicator

    An unhandled exception just occurred: Cannot animate the 'Visibility' property on a 'System.Windows.Controls.Border' using a 'System.Windows.Media.Animation.ObjectAnimationUsingKeyFrames'. For details see the inner exception.

    An unhandled exception just occurred: Cannot animate the 'Opacity' property on a 'System.Windows.Controls.ContentPresenter' using a 'System.Windows.Media.Animation.ObjectAnimationUsingKeyFrames'. For details see the inner exception.
  19. Nick
    Admin
    Nick avatar
    593 posts

    Posted 12 Jan 2015 Link to this post

    Hi Doug,

    It would be best to open a separate issue (support thread) for the Busy indicator problem, in order to get the best and most detailed assistance. 

    As for the original issue, I am sorry for the misunderstanding I will discuss the possibility of adding this feature with our development team. 



    Regards,
    Nick
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top