from current row to next row by Enter key in group and filter

2 posts, 0 answers
  1. AJing
    AJing avatar
    19 posts
    Member since:
    Jun 2011

    Posted 29 Nov 2011 Link to this post

    Hi :    
         The radgridview enable group and filter. The user want to skip the next row from current row and the next row into edit mode by Enter.  
           1. Our code as follows to achieve the enter key, :
            private voi dg_KeyUp(.....)
            {                  ......
                         var row =dgCut.Rows[dgCut.CurrentRow.Index+1];
                         { dgCut.CurrentCell.BeignEdit();}
          but if there is a filter by column 'Name', the enter key event behavior is strange.The current row can not skip to next row.

          To solve the problem with filter,we update the code as follows:
            private voi dg_KeyUp(.....)
            {                  ......
                         var row =dgCut.MasterView.Rows[dgCut.MasterView.CurrentRow.Index+1];
                         { dgCut.CurrentCell.BeignEdit();}

          the result as we do is :it is Ok by Enter key if there is only exsit filter.It is not Ok if there is group and filter.
         How to achieve the enter key behavior  if there is  a group or multiple group and a filter or multiple filter?

    Look forward to you
  2. Julian Benkov
    Julian Benkov avatar
    1135 posts

    Posted 02 Dec 2011 Link to this post

    Hello Ajing,

    The Rows collection of RadGridView control contains all data rows without filtering, sorting, grouping applied. If you want to manipulate current view of row collections you must use ChidlRows property. The best solution for your navigation scenario is to use GridTraverser. Please read this forum post regarding the solution.

    I hope this helps. Let me know if you need further assistance.

    All the best,
    Julian Benkov
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

Back to Top