Recent

Author Topic: How to move a cell to top right position of a worksheetgrid?  (Read 2307 times)

kjteng

  • Sr. Member
  • ****
  • Posts: 259
I tried worksheet.ScrollTo(rr, cc) but the worksheet does nt seems to work. Setting workgrid.toprow := rr etc ... does not work too.
« Last Edit: June 02, 2018, 03:05:56 pm by kjteng »

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: TsWorksheetGrid: How to scroll to specific row/col?
« Reply #1 on: June 02, 2018, 02:52:17 pm »
Look at attached demo

kjteng

  • Sr. Member
  • ****
  • Posts: 259
Re: TsWorksheetGrid: How to scroll to specific row/col?
« Reply #2 on: June 02, 2018, 03:31:55 pm »
Look at attached demo
Thank you for your pointer.  I think I found the answer already.   My earlier test does not work because the rr and cc I set is lager then the default value of worksheetgrid.rowcount and colcount.  Just make sure worksheetgrid.rowcount > rr and worksheetgrid.colcount > cc then I am able to move cell( rr, cc) to the top right position (by setting topRow := rr; leftcol := cc)

 

TinyPortal © 2005-2018