We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

copy and paste

I think I have finally have copy and paste working in all scenarios now correctly, but i encountered something today that I cant figure out whats happening. I have attached a sample in which u can reproduce my problem. Run the sample. Column B has data in it. Now this is the confusing part. If u select the one cell in row1 column b and click edit on my menu and then click copy. Then select the whole coulmn B by clicking its header in row0 column B. Then again click edit in my menu then copy. Now scroll over to the right so that u have columns F,G,H,I,J on the screen. Now select the column header of J to select the whole column and then go to the edit menu again and click paste. It pastes fine but notice how it scrolls ur grid back so that the column u copied from is in focus? Why is that. If i do almost the same thing as i walked u through above but skip the single cell selection and then edit and copy it doesnt do this. So if u close the app and open it up and just select column B then click edit and copy..then scroll to where u have f,g,h, i,j in view and then select column J and click edit paste u will notice it doesnt scroll the column u copied from back in view? The reason if u wonder why in the copy and paste where i decide if its a single cell versus a range is related to another question i asked u where u told me that single cell vs range copy and paste act differently. Any ideas?? copyandpaste2_3386.zip

6 Replies

Administrator July 8, 2004 07:13 PM UTC

I first tried your sample with a 2.0.6.0 internal build and did not see the problem. I then tried it with 2.0.5.1, and did see it snap back to where the last currentcell was. (Think this is what is going on, the grid is going back to where the last current cell was.) I was able to avoid it changing a EndEdit to CancelEdit after the copy. SendKeys.Send("^C") grdAGCY_RR.CurrentCell.CancelEdit() ''grdAGCY_RR.CurrentCell.EndEdit()

PB Philip Bishop July 13, 2004 11:51 AM UTC

Ok so how can i go about getting a copy of 2.0.6.0.???

Administrator July 13, 2004 11:53 AM UTC

It is a private build. You would have to submit a Direct Trac incident and request a download link for it.

PB Philip Bishop July 13, 2004 04:37 PM UTC

Hey thanks for pointing me to direct trac to get the new version. I have it now and have one question about it. When i try to run it now I get the following errors on this line of code i have in many diff forms. The code as follows grdCB_EP.CurrentCell.ScrollInView() The error i get on build for each of these is as follows... C:\Net Projects\quasar\frmCB_EP.vb(319): Argument not specified for parameter ''reason'' of ''Public Function ScrollInView(reason As Syncfusion.Windows.Forms.Grid.GridScrollCurrentCellReason) As Boolean''. I didnt get that before. Is there something I need to change??

PB Philip Bishop July 13, 2004 04:57 PM UTC

i think i figured it out..uve changed the way u do things..now i have to do this i think grdCB_ErP.CurrentCell.MoveTo(2, intSelectedCol) grdCB_ErP.CurrentCell.ScrollInView(GridScrollCurrentCellReason.MoveTo) where before i didnt have to have the reason moveto

Administrator July 13, 2004 05:42 PM UTC

One of the changes (about the only major change) in the 2.0.6.0 code base is support for RTL. This has required adding arguments to several methods to properly handle scrolling.
Loader.
Live Chat Icon For mobile
Up arrow icon