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

locking down grid when copying and pasting

Thread ID:





12100 Mar 22,2004 08:46 AM Mar 22,2004 09:56 AM Windows Forms 3
Tags: GridControl
Philip Bishop
Asked On March 22, 2004 08:46 AM

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 08:53 AM

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 09:11 AM

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 09:56 AM

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.

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.