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

CutPaste Problem

Thread ID:





76808 Sep 25,2008 03:20 AM UTC Sep 26,2008 06:33 AM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On September 25, 2008 03:20 AM UTC

Hi All:

I have a problem to use GridControl.CutPaste.

In my program , I must write it a rule to Grid CutPaste , and unable user to copy outside data to paste in Grid .

If I set
Me.Model.CutPaste.ClipboardFlags = 0

And my CutPaste way can't working at the same time .

How can I do CutPaste in my way , and user cnt't Paste data to grid from otherwise .

Think for any help.

Best Regards,

Jisha Joy [Syncfusion]
Replied On September 25, 2008 09:39 AM UTC

Hi Quenton,

The method Model.CutPaste.Paste() will paste whatever data you got in the Clipboard. If you set Clipboard flags to 0, it will not allow pasting into cell.

Please let me know if you have any further questions.


Administrator [Syncfusion]
Replied On September 25, 2008 12:20 PM UTC

Hi Jisha :

Thanks for your respond .

And my problem is how can I limit user using cut and paste "only" in Grid .

I write a button to let user can cut and paste data in grid .

And I wnat user can't cut data "form other place" to "paste into grid" .

Is any method can do that ?

By the way I have another question is :

The GridControl.ResizeColsBehavior can stop user to draw Grid Column width .

And how to limit only "1" Column can't draw ?

Best Regards,

Jisha Joy [Syncfusion]
Replied On September 26, 2008 06:33 AM UTC

Hi Quenton,

Issue 1:

This can be achieved by handling the PasteCellText event and canceling it. If you copy some text from Excel and paste it into the grid, then the PasteCellText event will be hit.

this.gridControl1.PasteCellText += new Syncfusion.Windows.Forms.Grid.GridPasteCellTextEventHandler(gridControl1_PasteCellText);

void gridControl1_PasteCellText(object sender, Syncfusion.Windows.Forms.Grid.GridPasteCellTextEventArgs e)

e.Cancel = true;

Issue 2:

If your intension is to prevent resizing of particular column, this can be achieved by handling the ResizingColumns event. Please refer the code:

this.gridControl1.ResizingColumns += new Syncfusion.Windows.Forms.Grid.GridResizingColumnsEventHandler(gridControl1_ResizingColumns);

void gridControl1_ResizingColumns(object sender, Syncfusion.Windows.Forms.Grid.GridResizingColumnsEventArgs e)

if (e.Columns.Left==2 )//Column2
e.Cancel = true;


Please try this and let me know if this helps.



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