Hi,
Is it possible to have some control over the cell click event? We have our own drag/drop functionality in our app and want to allow users to select cells and then drag that selection off the pivot. However, currently cells are selected by holding down the mouse and dragging, and the second click unselects the cells, it is difficult to integrate this functionality. Is there a way to either prevent the cell click event, or for example to only allow selection on shift-click? It looks as though the event handlers in the api do not give access to the event object itself?
Kind Regards,
Yousif
Hello, Yousif,
Thank you for your interest in Flexmonster Pivot.
We would like to inform you that it is possible to copy the selected cells and paste them elsewhere. Could you please let us know if such option works for you?
Another way to handle the case is to use a combination of cellclick
event and getSelectedCell
method that returns information about the selected cell/cells. Here is an example:
flexmonster.on('cellclick', function (cell) {
console.log(flexmonster.getSelectedCell());
});
Such code allows getting information about which cells were selected. Then you can highlight these cells by applying custom styles or just use the information about them.
Please share your feedback.
Regards,
Tanya
Hello Yousif,
We have carefully checked your case one more time. Please find our suggestions below:
Please let us know in case you need more guidance from us.
Regards,
Dmytro
Hi Dmytro,
Thank you for your reply. I have found a workaround to dragging directly from the grid that I think will work for our cell selection.
With regards to the getSelectedCell api method, it is great for getting data about the selection, but I cannot see a setSelectedCell method in the api reference - is there a way of clearing the selected cell collection directly via the api or otherwise?
Many thanks,
Yousif
Hello, Yousif,
We are glad you found a workaround which works well for you.
You are right, we don't have a setSelectedCell
method in the API reference.
However, we have a removeSelection API call which removes a selection from cells on the grid.
Hope this helps.
Please let us know if everything works for you and if you have further questions.
Best Regards,
Vera