Home > other >  Merging row cells in Vaadin Grid using jQuery
Merging row cells in Vaadin Grid using jQuery

Time:12-29

I would like to merge certain cells into a vaadin grid that has the same value. Is there a vaadin-way to do this? grid with duplicate cell value

grid after cell merge

So far I have achieved the desired result only using jQuery but outside vaadin environment. If there is no vaadin-way to merge the cells, is there a way to integrate jQuery script into vaadin and perform the merge?

Thanks!

CodePudding user response:

There’s no official way to merge cells in the Vaadin Grid.

Like you’ve done with jQuery, it may be possible to hack the internals with JavaScript. But that will likely break in one way or multiple ways. For example, if you have a lot of data rows/items, the merged cell will be reused for other rows/items when you scroll the grid (a.k.a. virtualized scrolling). Some of your data will not be visible because of that, and you will probably get a JS error as well, as the grid can't find a cell element that it expects to find (the one you merged and therefore removed).

  • Related