Set Scroll Position at first visible row and column in Aspose.Cells.GridDesktop

Is there a way to set the scroll position so when I have a grid with 100 lines, the scrollbar is at the top?

Right now, the scrollbar is showing in the middle.

Hi,

Thanks for considering Aspose.

Well, by default the grid shows the top most portion. And you may utilize GridWeb.ActiveCell property to activate and scroll down to your desired cell position.

E.g.,

Aspose.Grid.Web.Data.WebCell cell = GridWeb1.WebWorksheets[0].Cells["A1"];

GridWeb1.ActiveCell = cell;

Thank you.

This is Aspose.Grid.Desktop 1.9.4.2

Hi,

Thanks for considering Aspose.

Well, I checked, by default the GridDesktop shows the top most portion of the grid matrix. Could you elaborate and give us more details how you fill the data and where is the scroll bars set.

Thank you.

I was using AddRow and AddColumn to initialize my grid based on what I was putting in it.

My commenting out those lines, the scroll position seems to stay at the top.

Hi,

Yes, it will stay at the top by default. We will check to see if we can enhance scrolling moving along with the focused cell.

Thank you.

Please try the attached version.

Please use the new added Worksheet. SetFirstVisibleColumn() or Worksheet. SetFirstVisibleRow() methods to set the first visible column or row of sheet view.

Thank you

thank you…works great.

Would it be possible to have a GetFirstVisibleCell() so if on the CellDataChanged event, I reload the grid, I could put the scoll position in the same place as before?

Ok. We will get back to you next week.

Please use the new added Worksheet. GetFirstVisibleColumn() or Worksheet. GetFirstVisibleRow() methods to get the first visible column or row of sheet view.

Thank you