Is it possible to make the first column of a SlickGrid fixed? So that it is always visible during horizontal scrolling, like the header-row?
Thanks for help!
There was another forum link (can't find it now) that lead my to JLynch's fork. He maintains both a 1.4.3 tag with his patches for frozen columns and rows, as well as maintaining a 2.0 head. Here is the 2.0 example with both frozen rows and columns.
In that example, the author uses a couple additional options properties:
,topPanelHeight: 25
,frozenColumn: 2
,frozenRow: 5
Hopefully this does what you want without having to hack too much on the core!
I think you can make in the event .onViewportChanged()
the next steps:
.getColumns()
and stored in an array variable arrColumns
..getData()
in an array variable arrData
arrColumns
putting the first column at the beginning.arrColumns
with .setColumns()
arrData
with the order of the new arrColumns
..resizeCanvas()
Sorry but I don't find a method or an option in that you can make this behavior in the way that you want.
Well, see what you think of this. It is far from perfect, but it is an idea. I would make something better if the method scrollTo() would be public.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With