Hi
Hopefully this problem should be simple to get across.
I'm displaying data in an Ultragrid and do not wish the grid to react in any way to clicks. Info about the items is being provided by mouseover/tooltips instead.
However if you do happen to click on the bottom row, a new blank row appears at the bottom which forces the rest of the grid to scoll up and he top row gets hidden. This should not happen.
All Click-related events are disabled, but I have a feeling this is some other setting. Can you help ?
Just to clarify - when I say that "all Click-related events are disabled", I mean that I have not explicitly added any. I'm assuming that events such as CellClick and Click are not fired in some default way (behind the scenes) ;)
Hi,
It's hard to tell from these screen shots, especially since there are no lines between the grid rows.
Are the screen shots you posted here labelled correctly? They seem to be the opposite of what you are describing. The screen shot on top which says "Before Click" is the one with the empty space on it and the one on the bottom which says "After Row Has Been Clicked" has no empty space.
So assuming you just reversed these two images, it looks to me like you are clicking on the last row in the grid and that row is not completely visible, so the grid is scrolling to bring it completely into view. Like I said, it's hard to tell with no grid lines, but my guess is that the last row is clipped by a pixel or two.
If you are certain that all of the rows in the grid are visible (as much as neccessary) and you never want to grid to scroll, you could try handling the grid's BeforeRowRegionScroll event and setting e.Cancel to true.
A better solution would be to make the grid a little bigger so that the row fits and no scrolling is necessary.
Hi Mike
Thanks for the response.
The screenshots were in fact the right way round - being rendered in white and then posted onto the white background of the forum made the issue more confusing to see. I should have enclosed each grid in a dark border, or something.
Anyway your suggested solution - handling the BeforeRowRegionScroll event - works!
Many thanks!