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

GridControl ClipboardPaste Event

Thread ID:





18877 Sep 11,2004 06:01 AM UTC Sep 11,2004 08:18 AM UTC WinForms 2
Tags: GridControl
Maqsood Ahmed
Asked On September 11, 2004 06:01 AM UTC

Hello! I Copy some text from Excel and Paste it to the GridControl grid. If no. of Columns Copied from Excel are greater than the ColCount of GridControl, it simply adds more columns to the grid, a behaviour that I don''t want in my task. I started to use ClipboardPaste Event and tried to check the Range in GridCutPasteEventArgs''s RangeList.ActiveRange GridRangeInfo. But when I copy something from out of the Grid and want to paste it to the grid, e.RangeList.ActiveRange returns null, i-e. I could not check the copied data range. Is there anyway to restrict grid to not adding more columns while copy/pasting data from Excel???

Administrator [Syncfusion]
Replied On September 11, 2004 07:37 AM UTC

There is a property flag that controls whether or not rows/columns can be appended during a paste.
this.gridControl1.CutPaste.ClipboardFlags |= 
     (GridDragDropFlags.NoAppendCols | 

Me.GridControl1.Model.CutPaste.ClipboardFlags = Me.GridControl1.Model.CutPaste.ClipboardFlags _
          Or GridDragDropFlags.NoAppendRows _
          Or GridDragDropFlags.NoAppendCols

Maqsood Ahmed
Replied On September 11, 2004 08:18 AM UTC

Thanks for your answer. Its working fine now


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