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.
OK let me think for a button or message.
But still issue is that even when i click last fully visible row as was attached in screenshot still it moves up.
Yes, that was the point of my sample code - since the partial row is not visible, it alleviates the problem with clicking on that row and having it scroll into view. You have to explicitly scroll the row into view and then click it, so there's no weird mouse behavior, like clicking on a row and having that row move so that there's a different row under the mouse when you release the mouse button.
It looks like maybe Georgi's code was intended to stretch the last fully-visible row so that it fills the available space. Seems like a bizarre UI to me, but it that's what you want you could extend the UIElements in the last visible row. You can't change the Height property on the row inside a CreationFilter - that's a bad idea.
Another option would be to create some other element and put it into that gap - like a message or a button that you could click to scroll the next row into view. But that's problematic, because the height of the gap can vary and there might not be enough room for any other elements.
Thanks for your reply.
This sample project was given by Georgi to set height of row. now i am using a code which is given by you.
I attach a screenshot how it looks.
The last partial visible row is hidden but it's a blank row over there means there is noting in that area.
Hi,
The code you are using in this sample isn't anything like the code I posted. One big problem with this code is that you are setting the Height property on the row inside of the CreationFilter. You should not do that, as this will dirty the grid elements and cause the CreationFilter to fire again in an infinite loop.
The code I posted just hides the last row if it is cut off. Why are you resizing the rows?
Mike,
Here is your sample where i made this change.
(rowUIElement.Rect.Bottom >= parent.Rect.Bottom)
You can see now how it behaves.