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
115
Scrolling to the next screen row instead of the next row on the same band
posted

 Is there a easy way to change the behavior of scrolling for a multi-band grid so that instead of scrolling to the next row of the same band, it will scroll to the next screen row i.e. the first child row? Thx.

Parents
No Data
Reply
  • 927
    posted

    Yes, there is. By default, the grid uses actions called "AboveRow" and "BelowRow" when you use the keyboard arrow keys to navigate through the grid. The default behavior of these actions is to stay in one band. OTOH, PrevRow and NextRow actions navigate across bands. So you could, for example, replace the actions in the grid's BeforePerformAction event handler, using code such as this:

    //Replace up/down key with function that spans bands

    switch (e.UltraGridAction)

    {

       case UltraGridAction.AboveRow:

          e.Cancel = true;

          ultraGrid1.PerformAction(UltraGridAction.PrevRow);

          break;

       case UltraGridAction.BelowRow:

          e.Cancel = true;

          ultraGrid1.PerformAction(UltraGridAction.NextRow);

          break;

    }

     

     

Children
No Data