[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4132
  • Last Modified:

How can I tell if an infragistics ultragrid row is actually visible?

How can I tell if a row is visible? I don't mean whether or not it is hidden, I mean whether or not it has been scrolled out of view.  Any ideas on how to do this?
1 Solution
guxiyouAuthor Commented:
Specifically, if I have the row, how do I tell if it is visible?
You can get a list of the visible rows from the RowScrollRegion of a Band.  The RowScrollRegion's VisibleRows array contains a list of VisibleRow objects, which you can use to compare against the row you're searching for (in the below example, I was just searching for row at index 1.
Infragistics.Win.UltraWinGrid.UltraGridRow row = ultraGrid1.Rows[1];
foreach (Infragistics.Win.UltraWinGrid.VisibleRow rowVisible in ultraGrid1.DisplayLayout.RowScrollRegions[0].VisibleRows)
     if (rowVisible.Row.Equals(row)) { 
          MessageBox.Show("The row is visible"); return;  
MessageBox.Show("The row is not visible");

Open in new window


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now