Skip to content

Infragistics Community Forum / Desktop / Ultimate UI for Windows Forms / Programmatically select next row in an UtraGrid

Programmatically select next row in an UtraGrid

New Discussion
Andre
Andre asked on Apr 17, 2017 6:35 PM

Hi,

I’m trying to select the next row in an UtraGrid from outside the control.

So I have created a class MyUltraGrid derived from the original UltraGrid and added the following method

 

public void SelectNextRow()

{
if (this.ActiveRow == null)
{
return;
}

var nextIndex = this.ActiveRow.Index + 1;

if (nextIndex < this.Rows.Count)
{
this.Selected.Rows.Clear();

this.Rows[nextIndex].Selected = true;
this.Rows[nextIndex].Activated = true;
}
}

This works well. But it doesn´t work if I use a GroupByRow.

Can anyone give me a hint how to achieve the “select next row” functionality in a GroupByRow scenario?

I would like to achieve the same behavior which happens if I hit key up / down right inside the UltraGrid.

 

 

greetings

Andre

Sign In to post a reply

Replies

  • 0
    Mike Saltzman
    Mike Saltzman answered on Apr 17, 2017 6:35 PM

    Hi Andre,

    There's a much easier way. Any time you want to simulate keyboard actions with the grid, you can simply use the PerformAction method:

    this.PerformAction(UltraGridAction.BelowRow);

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Andre
Favorites
0
Replies
1
Created On
Apr 17, 2017
Last Post
9 years, 3 months ago

Suggested Discussions

Created by

Created on

Apr 17, 2017 6:35 PM

Last activity on

Feb 19, 2026 9:10 PM