[SOLVED] Dataview: change xCount dynamically

Hi,

What’s the best way to redraw a dataview ?
I’d like to change xCount dynamically and redraw the view.

setTimeout(() => {
      $$(this.dataviewId).define('xCount', 3);
      $$(this.dataviewId).refresh();
}, 1000);

thank you

Hello @franck34 ,
You may use resize() after define() when you are changing the component’s width or height.
Here is an example: Code Snippet .

1 Like

I didn’t think about resize() :slight_smile:

Perfect solution, ty !