0

I have a slickgrid list where it consists of hundreds of data and I have a column date which consists of date. I ordered it by date desc and I have lot of future dates in it and instead of scrolling down to the current date I need an automatic scrolling of the slickgrid to the current date whenever the page is loaded.

I just want to know how this can be achieved in slickgrid. I didn't find any useful links and so I posted it here.

John
  • 565
  • 8
  • 23

2 Answers2

1

I guess you will need to write a function that finds first row with current date and returns it's row index. Then you could use something like

grid.scrollRowIntoView(rowIndex,doPaging)

See documentation here: https://github.com/mleibman/SlickGrid/wiki/Slick.Grid#scrollRowIntoView

İlker Çakır
  • 149
  • 1
  • 10
0

There's no code here to try and replicate, but here is an approach I can think of.

We can find the date value in the slick grid row Extract row index from slickgrid using a unique cell value and get the row index, then use slick grid's gotoCell to go to that row.

L0uis
  • 703
  • 5
  • 8