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
25
Copy/paste rows when values are int, but display is text?
posted

Hi all,

In my ultrawingrid I turned on AllowMultiCellOperation, and have am having trouble copying/pasting rows. The cols that are really just text paste in just fine. But 3 of my cols are int valued, with text displayed to the user. When the paste operation gets to these cols, I receive the error:

"Error performing Paste operation. Further information: Unable to convert the value [displayedtexttouser] to the column's data type: Illegal data value. Continue with the remaining cells?"

Is there a way I can get the row Copy process to copy the value, and not the display text? Or from the other end: is there a way I can get the Paste process to internally translate the display text into the int values of the column?

Thanks for any suggestions,

cdj

Parents Reply
  • 315
    Offline posted in reply to Mike Saltzman

    Hi Mike,

    I have already mentioned that I am using VS2010, Infragistics 10.2 in earlier posts.

    I saw the sample sent by you, which does not give error. 

    Some change was required in the code itself.

    1. To ultra grid, the dataset containing valid values was assigned which has white spaces at the end of string. When I export the data from grid to excel, the spaces remained untouched but while pasting it from excel to grid, the spaces trimmed. I trimmed the values copied it in a list if string and attached the list as data source.

    2. The data type of column is set to string.

    This resolved my problem.  Please check attached sample to reproduce the behavior.  Copy first row and paste on second row.

     

     

Children