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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

locking down grid when copying and pasting

Thread ID:





12100 Mar 22,2004 01:46 PM UTC Mar 22,2004 02:56 PM UTC WinForms 3
Tags: GridControl
Philip Bishop
Asked On March 22, 2004 01:46 PM UTC

Say you have a grid that has 10 rows. Then say a user copies 10 rows from like excel and then tries to paste those 10 into your grid but they click the last row in the grid and then paste. The way it works now is it pastes one row into our last row and then makes 9 new rows so now our grid has 19 rows. Is there any simple way to lock the grid down so if they try to paste and its going to go outside the grid that it wont let them. It would do as much as it can and then truncate the rest. So in that last scenario i gave u it would of pasted the first copied row in the last row in my grid and then stop and not make any new rows???? Thanks Phil

Administrator [Syncfusion]
Replied On March 22, 2004 01:53 PM UTC

There is a property flag that controls whether or not rows/columns can be appended during a paste. Me.GridControl1.Model.CutPaste.ClipboardFlags = Me.GridControl1.Model.CutPaste.ClipboardFlags _ Or GridDragDropFlags.NoAppendRows _ Or GridDragDropFlags.NoAppendCols

Philip Bishop
Replied On March 22, 2004 02:11 PM UTC

Clay, Again thanks for the unbelievable 7-minute response time. WOW. My only other question is where could i have found that answer myself without asking you? Thanks again Phil

Administrator [Syncfusion]
Replied On March 22, 2004 02:56 PM UTC

I found it by looking up Paste in the VisStu help to see this link: ms-help://MS.VSCC/Syncfusion.Essential_Suite/Syncfusion.EssentialSuiteClassRef/Syncfusion.EssentialSuiteClassRef/Syncfusion.Grid~Syncfusion.Windows.Forms.Grid.GridModelCutPaste~Paste.html There is is a statement saying use ClipboardFlags to customize default behavior with a hot link to ClipboardFlags that eventually will get you to ms-help://MS.VSCC/Syncfusion.Essential_Suite/Syncfusion.EssentialSuiteClassRef/Syncfusion.EssentialSuiteClassRef/Syncfusion.Grid~Syncfusion.Windows.Forms.Grid.GridDragDropFlags_members.html where the flags are defined.


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

Live Chat Icon For mobile
Live Chat Icon