We have updated WebDataRocks EULA, effective as of April 18, 2024. Learn more about what's changed.

getSelectedCell() not working as documented for multiple cell selection

Answered

The documentation states that if multiple cells are selected, getSelectedCells() will return an array of CellData objects.  However I am finding that this is not the case, either in the codePen example linked with the documentation, or in my implementation, which always returns an array of length 1 for both rows and columns, regardless of how many cells are selected e.g., as shown in below output.  Is it possible to make it work as documented, or alternatively to implement a getSelectedRows() method?  
 

  1. rows: Array(1)
    1. 0: {caption: “Configuration.Databases.Smoke”, uniqueName: “name.Configuration.Databases.Smoke”, hierarchyCaption: “name”, hierarchyUniqueName: “name”}
    2. length: 1
    3. __proto__: Array(0)
  2. type: “value“
  3. value: 0
  4. width: 225
  5. x: 259
  6. y: 85
  7. __proto__: Object

3 answers

WebDataRocks Team WebDataRocks September 13, 2019

Hello Olga,
 
Thank your for reporting.
It seems that there is an issue with returning array of selected cells.
We will add your request to our backlog for further improvements.
Currently, getting only the first selected cell is supported.
 
Also, we recommend checking Flexmonster which is a premium pivot table component developed by the same team. It does not have such limitation.
 
Regards,
WebDataRocks Team

Thanks for the response.  Actually I found a workaround to this (using checkboxes with onCustomizeCell) but would need https://www.webdatarocks.com/question/cannot-ovverride-css-padding-on-column-total-cells/  and/or https://www.webdatarocks.com/question/cell-style-in-oncustomizecell-gets-compiled-to-garbage-text-and-corrupts-display/ addressed to fully make it work.

Ps, if one of the above-referenced issues can be addressed, we would potentially be looking into purchasing a perpetual unlimited data license for Flexmonster.