No Tab Stop on specific column cells

3 posts, 0 answers
  1. Gone2TheDogs
    Gone2TheDogs avatar
    55 posts
    Member since:
    May 2016

    Posted 15 Feb 2018 Link to this post

    Is there a way to remove tabstops on some column's cells and not others?

    Many of the users will only be using a keyboard and the form I'm building has a gridview with only 2 columns out of 12 that only need to tabbed through.

     

     

  2. Dimitar
    Admin
    Dimitar avatar
    2512 posts

    Posted 16 Feb 2018 Link to this post

    Hi Bob,

    To achieve this you need to create new GridDataRowBehavior which will allow you to manually handle the Tab. This way you will be to select the desired column. The following snippet shows how you can implement similar behavior:
    public partial class RadForm1 : Telerik.WinControls.UI.RadForm
    {
        public RadForm1()
        {
            InitializeComponent();
            BaseGridBehavior gridBehavior = radGridView1.GridBehavior as BaseGridBehavior ;
            gridBehavior.UnregisterBehavior(typeof(GridViewDataRowInfo));
            gridBehavior.RegisterBehavior(typeof(GridViewDataRowInfo), new CustomGridRowBehavior());
        }
     
       
    }
    internal class CustomGridRowBehavior : GridDataRowBehavior
    {
        
     
        protected override bool ProcessTabKey(KeyEventArgs keys)
        {
            if (this.GridControl.CurrentCell.ColumnIndex == 0)
            {
                this.GridControl.GridNavigator.SelectLastColumn();
            }
            return base.ProcessTabKey(keys);
        }
    }

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Gone2TheDogs
    Gone2TheDogs avatar
    55 posts
    Member since:
    May 2016

    Posted 16 Feb 2018 in reply to Dimitar Link to this post

    Thank you, Dimitar. Very much appreciated.
Back to Top