BrightIdeasSoftware.ObjectListView.CopySelectionToClipboard C# (CSharp) Method

CopySelectionToClipboard() public method

Copy a text and html representation of the selected rows onto the clipboard.
Be careful when using this with virtual lists. If the user has selected 10,000,000 rows, this method will faithfully try to copy all of them to the clipboard. From the user's point of view, your program will appear to have hung.
public CopySelectionToClipboard ( ) : void
return void
        public virtual void CopySelectionToClipboard()
        {
            IList selection = this.SelectedObjects;
            if (selection.Count == 0)
                return;

            // Use the DragSource object to create the data object, if so configured.
            // This relies on the assumption that DragSource will handle the selected objects only.
            // It is legal for StartDrag to return null.
            object data = null;
            if (this.CopySelectionOnControlCUsesDragSource && this.DragSource != null)
                data = this.DragSource.StartDrag(this, MouseButtons.Left, this.ModelToItem(selection[0]));

            Clipboard.SetDataObject(data ?? new OLVDataObject(this, selection));
        }
ObjectListView