Custom tabbing control on RadGrid columns

14 posts, 0 answers
  1. Mike
    Mike avatar
    8 posts
    Member since:
    Jul 2010

    Posted 15 Jul 2010 Link to this post

    Hi,

    I'm hoping to set my tabstops in order to prevent certain columns from being tabbed to within a RadGridView. For example, say I have a grid with columns 'Name', 'Address', 'Phone Number', and 'Notes'. All columns except notes are strictly for displaying retrieved data, but the Notes column is editable, and uses a textbox within a datatemplate. I only want to have tabbing enabled to the Notes column, and have the tabs not stop at any other columns. Initially I tried setting the main RadGridView declaration to TabIndex=-1 and IsTabStop=False, with the TextBox for Notes set to be a tabstop, but tab controls on the RadGridView don't seem to function correctly - it is still possible to tab to the RadGridView. Is it possible to control tabbing within a RadGridView, or even disable tabbing to it?

    Thanks very much.

    Edit: I've forgotten to mention that I'm developing using Silverlight and C# in an MVVM framework.
  2. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 19 Jul 2010 Link to this post

    Hello Mike,

    If you set RadGridView.IsTabStop and you don't have some custom elements within (like custom CellTemplates) TAB should skip RadGridView (except in case when RadGridView is in edit mode). However you can disable tabbing by overriding TAB key behavior (for more information take a look at this blog post). Another possible solution is to set first three columns ("Name", "Address", "Phone Number" as read-only and then when RadGridView is in edit mode TAB will navigate only between editable cells).

    Kind regards,
    Nedyalko Nikolov
    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
  3. DevCraft banner
  4. Mike
    Mike avatar
    8 posts
    Member since:
    Jul 2010

    Posted 29 Jul 2010 Link to this post

    Hi Nedyalko,
    Thanks for your reply and sorry for the delay in my response.
    My code seems to fit what you describe, but it does not behave as expected. I'm using this code for my RadGridView:
    <telerik:RadGridView ShowGroupPanel="False" ItemsSource="{Binding Customers}" IsFilteringAllowed="False"
        CanUserSortColumns="False" CanUserReorderColumns="False" CanUserFreezeColumns="False" IsReadOnly="False" Grid.Row="2" EditTriggers="CellClick"
        SelectionMode="Single" AutoGenerateColumns="False">
        <telerik:RadGridView.Columns>
            <telerik:GridViewDataColumn Header="Name" Width="Auto" HeaderTextAlignment="Center" DataMemberBinding="{Binding Name}" IsReadOnly="True">
            </telerik:GridViewDataColumn>
            <telerik:GridViewDataColumn Header="Phone" Width="Auto" HeaderTextAlignment="Center" DataMemberBinding="{Binding Phone}" IsReadOnly="True">
            </telerik:GridViewDataColumn>
            <telerik:GridViewDataColumn Header="Address" Width="Auto" HeaderTextAlignment="Center" DataMemberBinding="{Binding Address}" IsReadOnly="True">
            </telerik:GridViewDataColumn>
            <telerik:GridViewDataColumn Header="Notes" Width="150" HeaderTextAlignment="Center" DataMemberBinding="{Binding Address}" IsReadOnly="False">
            </telerik:GridViewDataColumn>  
        </telerik:RadGridView.Columns>
    </telerik:RadGridView>

    When I tab in to the grid from another control, the tab stop cycles through each column header and then each cell in the grid. The tab behavior is unchanged if I set TabIndex=-1 and IsTabStop=false in my RadGridView declaration - it will still tab through both the column headers and grid itself. I am hoping to have the tab stop only in the 'Notes' cells (and not any column headers) whether the grid is in edit mode or not. I will try the custom key command method that you linked to. Is it possible to prevent tabbing to column headers using this method? It is not obvious to me whether this is possible, or how to go about it.

    My goals aside, it seems that the functionality that controls tabbing to RadGridView does not work properly, as I cannot prevent it from being tabbed in to.

    Regards,
    Mike
  5. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 03 Aug 2010 Link to this post

    Hi Mike,

    Could you confirm that you are using our latest version (2010.Q2 - 2010.2.714.1040)? RadGridView.IsTabStop will work only with our latest version.
    We will consider to add a property to the GridViewColumn (may be IsTabStop) which could be used in such cases. Unfortunately I cannot commit with any specific date or release when we will introduce it (approximately around one month from now). I'm not sure that implementing this with overriding key behavior will worth the coding.

    All the best,
    Nedyalko Nikolov
    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. Pawan Sharma
    Pawan Sharma avatar
    7 posts
    Member since:
    Dec 2009

    Posted 19 Jan 2011 Link to this post

    Hi,

    I am having the same issue with the latest version of the RadGridview. I want to stop the tab on some of the GridviewColumn while in current scenario it stops at each GridviewColumn. In the previous comment of this thread, I saw there was mention of IsTabStop property to be introduced for the GridviewColumn. Please let us know if there is any plan to implement the same in near future.

    Thanks & Regards,
    Pawan 
  7. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 24 Jan 2011 Link to this post

    Hi Pawan,

    Indeed we have to plan to introduce such property and we are doing our best in order to deliver it for the upcoming beta release of our control. And of course this will become official with the next official release. If we manage to make it earlier we will make it public via latest internal build program so stay tuned.

    Regards,
    Nedyalko Nikolov
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  8. Anton Swanevelder
    Anton Swanevelder avatar
    28 posts
    Member since:
    Aug 2008

    Posted 20 Feb 2012 Link to this post

    Hi,

    I also urgently need the TabStop property on GridViewDataColumn. I see from this post that this was to be added 1 year ago.

    Can you please advise what the status of this is.

    Thanks,
    Anton


  9. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 23 Feb 2012 Link to this post

    Hi,

    We will introduce such property (GridViewColumn.TabStopMode) with the next official release (2012.1.SP1).

    All the best,
    Nedyalko Nikolov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  10. Anton Swanevelder
    Anton Swanevelder avatar
    28 posts
    Member since:
    Aug 2008

    Posted 22 Mar 2012 Link to this post

    Hi,

    Is this fix available in this release 2012.1.215 or is this release still due?

    Thanks,
    Anton
  11. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 23 Mar 2012 Link to this post

    Hello,

    TabStopMode property is available with our latest internal build (2012.1.0319) and will be available with the upcoming service pack as well.

    All the best,
    Nedyalko Nikolov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  12. Adam
    Adam avatar
    70 posts
    Member since:
    Jun 2008

    Posted 01 May 2012 Link to this post

    Hi all,

    This functionality seems to be broken for a grid with all columns using controls in the CellTemplate.  The Tab Stop will skip when tabbing backwards, but tabbing forwards from the first column will skip past all other columns set to skip.  Very strange.

    Thanks!
    Adam.g
  13. Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 02 May 2012 Link to this post

    Hello Adam,

    I am not sure I understand the problem you describe. Do you set TabStopMode="Skip" for all columns or for particular ones? Can you describe the steps you perform and when exactly the tab navigation does not work correctly according to TabStopMode setting?
     
    Greetings,
    Yordanka
    the Telerik team

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

  14. Adam
    Adam avatar
    70 posts
    Member since:
    Jun 2008

    Posted 02 May 2012 Link to this post

    Sure,

    I think the overall problem trying to be solved is that when using controls in cell templates of the RadGridView tabs go first to the cell then to the control then to the next cell.  Currently, when using this setup and setting each column to TabStopMode="Skip", forward tabbing through the cells skips the columns AND the controls, so this obviously isn't working as I might expect, though this may be your intended behavior.  However, as another eccentricity of this setup, backwards tabbing through the fields actually works exactly as I expect, with the column cells not being selected but each control getting focus.

    Adam.g
  15. Vera
    Admin
    Vera avatar
    263 posts

    Posted 07 May 2012 Link to this post

    Hello Adam,


    We have tried to reproduce the described behavior but without any success. Could you please share some more details about your particular scenario? What does your custom control contains? A code-snippet would be of much help.


    Kind regards,
    Vera
    the Telerik team

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

Back to Top
DevCraft banner