Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
How to customize the text copied from a data grid's cell
posted

Hi,

I have grid which renders complex objects at every cell. In order to accomplish this I have a component within an igxCell template. I also have a different component to enable edition within an igxCellEditor template. Both rendering and editing work as expected. So far so good.

Attempting to copy any cell's content will yield, as it can be imagined, the dreaded [object Object] string. This can be circumvented by adding a toString() method in the objects acting as cells' values which does more or less the same the rendering component passed as igxCell does. Is there any better way to do this? I for instance attempted to set a HostListener on the rendering component, but it won't listen to keydown events (needed to detect ctrl-c). Clicks and double clicks are detected... but we need dblclick to enter edition.

Any idea as to how to tackle this would be much appreciated.