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
205
How to change default copy/paste separator?
posted

Hi all, I have interesting question.

Let's set some text to grid cell and then copy:

Let's paste copied string to Word and enable showing of special characters:

You can see that cells are separated by some special symbols. But if I copy from old grid for VB 6 separator is tab symbol:

How can I set tab as a separator in Windows Forms Grid? If I should implement custom parsing how can I get copy string after calling grid.PerformAction(UltraGridAction.Copy)?

Any help would be appreciate.

Parents
  • 23930
    Offline posted

    Hi Maksim,

     

    Thank you for posting in our forums.

     

    What you can do in your case is to handle the BeforeMultiCellOpearation event of the grid. In it asynchronously get the text from the clipboard and replace the empty characters with a tab character and set it back as the clipboard text. This way when you paste the text into word it will have tabs as the separators.

     

    I have attached a small sample which demonstrates this suggestion.

     

    Let me know if you have any additional questions.

    WG_CopySeparator.zip
Reply Children