Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
Stay in row on tab key
posted

I'd like to stay in the same row when the user press the tab key in the last column. The first column of the same row should be activated. How can I manage this?

I tried to edit the KeyActionMappings (where i mapped the NextRowByTab action to the FirstCellInRow action) but without success...

My next step was to do it in the beforePerformAction event with the following code:

 

 

 

 

 

 

 

 

 

 

 

void

 

ultraGrid1_BeforePerformAction(object sender, BeforeUltraGridPerformActionEventArgs e)

{

UltraGrid grid = (UltraGrid)sender;

switch (e.UltraGridAction)

{

case UltraGridAction.NextRowByTab:

grid.PerformAction(UltraGridAction.FirstCellInRow);

e.Cancel = true;

break;

}

}

Again, the tab sets the cursor to the next row instead of the first cell in the same row. A test with a messagebox output shows that the executed action in the last cell NextCellByTab and not NextRowByTab (as mentioned by me).

What's wrong? How can I solve that problem? Thanks for answers

I'm using NetAdvantage 9.2 Win

Parents
No Data
Reply
  • 12773
    posted

    Hello,

    You can try handle NextCellByTab, this the action that is executed on the end of the row too. The same action is executed also when you are within the row and press tab. Just when there is not next cell on the same row the cursor is moved to the next cell  that is on the next row.

    Performing this code allows me to move the cell to the firsts cell in the same row.

    UltraGrid grid = (UltraGrid)sender;

                switch (e.UltraGridAction)
                {

                    case UltraGridAction.NextCellByTab:

                        grid.PerformAction(UltraGridAction.FirstCellInRow);

                        e.Cancel = true;

                        break;
                }

    Take a look at this article you may found it helpful how to control and handle actions on the grid navigation
    http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=1997
     
    I hope this helps.

    Sincerely,
    Dimi
    Developer Support Engineer
    Infragistics, Inc.

Children
No Data