Forum Discussion

David91's avatar
David91
Frequent Contributor
6 years ago

UltraGrid - get DATA only visible row

Hi

 

i need filtering only visible row on screen in UltraGrid with Javascript.

 

UltraGrid has total 33 row but visible is only 5. I get only visible row with this code..

 

m_ultraGrid.Rows.VisibleRowCount; 

 

I need to go through only these five visible lines and compare them to the string..

 

 How do I go through (cycle for??) the values ​​of these visible rows? Thank you your advice!

 

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I'm not familiar with that control and, without it in front of me or appropriate screenshots of available properties, methods, etc., I can't give you explicit instructions on how to do it.  I have two theoretical ways that may work:

     

    Option 1:

    Using the VisibleRow count, do a for loop on visible row count.  First thing in the loop should be a comparison of the top row to your desired string.  Then use a keystroke to go down a row.  Then loop that.  I've done something similar in other controls and this has worked with some success.

     

    Option 2:

    Use a for loop to loop through all 33 rows.  In the loop, for any given row, check to see if that row has a property that indicates visibility.  If the row is not visible, do nothing.  If it is, do your comparison.

     

    These are JUST guesses... hopefully they'll point you in the correct direction.