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
220
How to prevent the creation of a new row when pasting empty clipboard into grid cell
posted

I currently have an UltraGrid with an AddRow consisting of a number of columns, including some which are basic text columns.

When a user chooses to paste non-text clipboard information into the cell using CTRL+V, a new row is automatically created.

What is the easiest way to prevent this?

I've tried several different things, and have been unable to come up with a solution. 

Currently, the only thing I can think of would be to create a custom editor, and override the paste method to prevent the paste.  However, I can't believe that there is not an easier solution than this...

Thanks

 

Parents
  • 469350
    Suggested Answer
    Offline posted

    Hi,

    I'm not sure I understand. Why would pasting into the grid create a new row? Do you mean that the user is pasting into the TemplateAddRow?

    You say the data is non-text, but what exactly do you mean. Is the paste operation writing any values to any of the cells in the row? If any cell in the row is changed, then the row is considered dirty and a new row ill get created. If nothing in the clipboard is valid for the row and there is no data written into the row and a new row is still being created, I think that's probably a bug.

Reply Children