Hello,
I am trying to copy/paste in UltraGrid (just usual Windows Ctrl-C/Ctrl-V) but it doesnt look straightforward.
I have used the below property to allow copy/paste. Still yet, its complaining the contents is more than current capacity.
Any workaround to resolve this, as we have requirement to enter huge values in the grid and this will be typically copied from the excel spreadsheet.
this.ultraGrid1.DisplayLayout.Override.AllowMultiCellOperations = AllowMultiCellOperation.Copy | AllowMultiCellOperation.Paste;
What's the problem, exactly? What is the error message you are getting? Where are you copying from and what is selected in the grid when you are pasting?
Right,
The problem is that, when I have ultragrid - single column with date values and need to have functionality for the user to copy list of dates from excel spreadsheet to this column. I can able to paste just one row but if the copy content is more than 1 row, then I see an error:
Error performing paste operation. Contents being paste have more rows than whats available starting from the anchor cell. Paste contents have 8 rows where as the available rows starting from the anchor cell are 1.
Can you suggest any solution ?
Not sure, why you mentioned about the error before BeforeMultiCellOperation. But I have found a workaround from one the KB articles which works by:
1. Copying the content from Clipboard.Text
2. Parsing no. of lines
3. Creating the same rows/columns &
4. Insert into the Grid.
Anywyas, thanks for the suggestions.
Would be good idea, if you can request your team to provide some simple solution for UltraGrid paste especially there are loads of simple user request to copy it from the excel.
I'm trying to copy a column of cells from Excel but I already have all the rows that I need in the grid.
I'm not adding any rows to the grid.
Is there something that does that.
Hi rhd,
I'm afraid I do not understand your question. If you want to copy and paste from Excel into the WinGrid, you just have to turn on AllowMultiCellOperation on the Override to allow pasting.
I'm copying one column of values from excel into a grid that has three columns but I only want the one column to be overwritten.
For example I am copying scores from an excel spreadsheet over to a grid that would have peoples names in one column but the scores will go into the last column.
Hello rhd,
Could you please take a look at the video attached to this post. I am demonstrating the capabilities Mike is talking about. Is this what you want? Please let me know if I misunderstood you, I will be waiting for your feedback!
Thanks I got it working.
Hi,
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
You will have this ability just by doing what Mike said:
If you want to copy and paste from Excel into the WinGrid, you just have to turn on AllowMultiCellOperation on the Override to allow pasting.
Do you have the example in code so I can see how you did it?
Thanks.
Yes, you can. I did it the other way just for the video sample.