Display the activerow

How can I get a grid's active row to display when it is outside the "scroll window".

For example ... I have a grid that contains > 10 rows but only 10 display. If I populate the grid and set grid.activerow := 15 then row 15 is selected / highlighted, but the user can't see the highlighted row unless he manually uses the scrollbars. It like I need something like "ScrollActiveRowIntoView" or "SetActiveRowToTop"!!! 



You can set the Scroll.ScrollIntoView property to true to have the TIWAdvWebGrid automatically scroll to the active row.

Hi Bart

I'd already tried that and it doesn't seem to do anything. No matter what number >10 I set the activerow to equal it is always the first 10 rows that display (based on the grid height). The scrollintoview = true or false doesn't change that.


I'm not aware of any issues using the ScrollIntoView property.
Can you please provide a ready to run sample project that demonstrates the issue so I can further investigate this?
Please also let me know which version of IntraWeb and which browser you are using.

I am having exactly the same issue on one of my projects, I know that the RowIndex is being updated correctly because I'm updating a label with that information just after I set it and I know that ScrollIntoView is set to true because I've set it (and I tried setting it in code as well).

However and this is where things start to get strange, I imported an older application I had written using Delphi 2009 (and a much older version of Intraweb) which I know didn't have this issue and it worked as expected so I created a test project just in case there was something "strange" about my older project and it too works fine, even when I set everything on this new project to be the same as the project that doesn't work I still cannot get ScrollIntoView to fail, it works perfectly so this implies that is something else happening in the project that is not working and most likely something I've done so I'm looking for clues, what would stop ScrollIntoView working i.e. what could I have included as an event (Aysnc or otherwise) that would be stopping this, I can't see anything but it's possible that the answer is staring me in the face and I'm just not seeing it.




Have you tried to remove events one by one to see if the issue stops occurring?
Have you noticed any JavaScript errors in the browser when the issue occurs?

No JavaScript errors that I can see, tried both Chrome and IE and I've tried to see if it as sort of event in my test project (I'm using XE4 and IW 14.0.22 btw) by making that the same as the original project (a small reluctance right now to muck around too much with my original one) and so sort of do that in reverse i.e. add the events to see if I can get it to break, but guess I'm going to have to try the other route, will let you know.

If the problem persists, please provide a ready to run sample project that demonstrates the issue so I can further investigate this.