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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Copy from Excel and Paste to a specific location

Thread ID:





106665 Jan 21,2013 08:23 AM UTC Jan 22,2013 06:31 AM UTC WinForms 3
Tags: GridControl
Asked On January 21, 2013 08:23 AM UTC


I am using syncfusion and I need some help with GridControl for WinForms. I need to copy data from excel and paste it into GridControl. GridControl is doing a good job here. The only problem is I dont want to always paste to the area starts from "CurrentCell".

I implemented the ClipboardPaste handler and performed some check there. If the data being pasted satisfies a certain condition, I want to move the CurrentCell to a specific location, say (0,1), so that the data would be pasted from this new "origin". I tried CurrentCell.MoveTo(0,1) in ClipboardPaste handler, it didnt work. CurrentCell was indeed moved, but the data was still pasted to the original place.

I am not sure how the paste function works, but it seems that manipulating CurrentCell is not the correct way. Could you please help give some advice on my question? Thanks!

Arun Kumar V [Syncfusion]
Replied On January 21, 2013 11:30 AM UTC

Hi Xinchao,

Thanks for your interest in Syncfusion products.


Copy paste from excel to current cell.

I have attached a sample based on copy paste cells from excel, I have also attached a video file which shows how the excel values are pasted from the currentcell of the grid.  please make use of it and let me know if the issue is solved.

Sample : Excel Copy paste.zip

Video   : video.zip

Please let me know if you have any other concerns.



Replied On January 22, 2013 02:22 AM UTC

Hi Arun,

Thanks for your answer. That's a good example to interact with excel. But I want to ask if it is possible to copy from excel and paste to a grid cell other than the CurrentCell? 




Arun Kumar V [Syncfusion]
Replied On January 22, 2013 06:31 AM UTC

Hi Xinchao,

Thanks for the update.


Paste in another cell, than current cell.

If you want to paste the current text other than the current cell then you can customize the currentcellchanging event.

Please refer to the following code snippet.

void gridControl1_CurrentCellChanging(object sender, CancelEventArgs e)





Please let me know if you have any other concerns.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon