Hi and thanks for reading my question,
I have a UltraWinGrid with a large number of rows, let's say more than 100. On the screen at a given time there are visible only about 7, 8 of them. I'm looking for a way of showing only the rows that are fully visible, so if the last row is not completely visible it should not be visible until the grid is scrolled.
I've searched for a property or for a method of doing this. It can easily be done for columns but i haven't found a way to do it for rows. Also in this case resizing the grid is not an option.
Thanks for any tips,
Adrian Faciu.
Still it's not working for me. but i found this code while i was doing some research.
but there are some properties which is not in infragistics . can we do make same code like this in infragistics.
It's simple and easy to understand.
if (!this.dataGridView1.CurrentCell.Displayed)
{ Console.WriteLine("current cell is not displayed");}else{ Rectangle displayCellRect = this.dataGridView1.GetCellDisplayRectangle(this.dataGridView1.CurrentCell.ColumnIndex, this.dataGridView1.CurrentCell.RowIndex, true); if (displayCellRect.Width == this.dataGridView1.Columns[this.dataGridView1.CurrentCell.ColumnIndex].Width) { Console.WriteLine("current cell is completely displayed"); } else { Console.WriteLine("current cell is partially displayed"); } }
Hi,
My guess is that the row is not fully visible, then. Maybe there is one pixel cut off? I suppose it's possible that the logic in the CreationFilter I created here is off by a pixel.
Try changing:
if (rowUIElement.Rect.Bottom > parent.Rect.Bottom)to if (rowUIElement.Rect.Bottom >= parent.Rect.Bottom)Or maybe add one to fudge it a little.
Thanks for your reply.
When I am trying to click on last fully visible row still it moves row up and selects next one.
I don't have any blank area on grid.
I'm not sure I understand you. You are saying that you are using the code I posted here, and that somehow, clicking on a blank area where there is no visible row displayed is causing the grid to scroll? I don't see how that's possible.
I tried it out and clicking on the empty space does not scroll the grid on my machine.
Hi Mike,
I am on same page where i was stared to make this change. Here is my issue.
I am trying to use same code as you mentioned. last partial row is visible now but still clicking on last visible rows it moves next row and i have a hyperlink in my grid.
Can you please let me know some solution?