onScroll grid.refresh() from template

I have a situation where I am generating span on template it works if I have grid.refresh() on renders, but on scroll Webix is redrawing the columns but I have to use grid.refreshColumns() or grid.refresh() to get the columns renders correctly, can you suggest how to get the grid to refresh on scroll without me capturing the event and refreshing the grid


  • Hello, @Bunny
    When you describe templates in column config, the template in the column will be displayed regardless of how the data is loaded (including when loading when scrolling).
    Please, check the snippet here:https://snippet.webix.com/i20uop0v

  • Hi @AlenaLisava , Thank you for response
    So, the issue I am facing it when I scroll template fn is called for other cells, and in it I am updating spans, but one thing I am missing is to refresh the grid, can you tell me how do I that manually

    on Scroll _getValue -> template -> createSpans this is the chain of events, if I add refresh after every span add it crashes with maximum call stack

  • I can see the spans being updated but grid doesn't refresh auto ? do I have to call grid.refresh() after every change ?

  • Hello, @Bunny
    Spiking about the first situation:
    When you have dynamic loading of data and scroll, each scroll call DataRequest, which refreshes datatable.
    When you've applied a new template to the item, you won't see it until this item is refreshed.
    You could call the refresh method for a specific row. For that transfer row id to the method.

  • Thanks @AlenaLisava for all the help, understood that these operation are not virtualised

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!