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.
Syncfusion Feedback

GridControl ClipboardPaste Event

Thread ID:

Created:

Updated:

Platform:

Replies:

18877 Sep 11,2004 06:01 AM UTC Sep 11,2004 08:18 AM UTC Windows Forms 2
loading
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.
//C#
this.gridControl1.CutPaste.ClipboardFlags |= 
     (GridDragDropFlags.NoAppendCols | 
      GridDragDropFlags.NoAppendRows);

''VB.NET
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

CONFIRMATION

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.

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

;