Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

201
Vistas
Cannot subscribe on slickgrid scroll event

I'm using slickgrid as container for data, and trying to subscribe on it's onscroll event as of described in documentation, i.e.

task_list.onscroll.subscribe(function(e, args) {
    console.log('scrolling occured');
});

Actually, I'm trying to do other processing afterwards, which is translating contents of the web page. The content is not fully translated, so I need to translate each time I scroll the page. However I get the message

Uncaught TypeError: Cannot read properties of undefined (reading 'subscribe')

How can I troubleshoot this error and find out why I get it?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

There's a few small errors in your code, first the event names are camelCase so it should be onScroll and second if you want to subscribe to SlickGrid events then you need to use the grid object

grid.onScroll.subscribe(function(e, args) {
 // ...
});

and don't forget to unsubscribe when leaving the page because you'll have quite a leak with the onScroll. I prefer to use the Slick EventHandler since it has an easier unsubscribeAll method that I can use when destroying/leaving the page

var eventHandler = new Slick.EventHandler();
var grid = new Slick.Grid("#myGrid", dataView, columns, options);

function something() {  
  eventHandler.subscribe(grid.onScroll, function(e, args) {
    // ...
  });
}

function destroy() {
  eventHandler.unsubscribeAll();
}

Hopefully there's no error in my code but just to let you know I wrote by memory here so please double-check the code and look at the multiple SlickGrid Examples which all have easy code access

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda