JaedenRuiner 0 Newbie Poster

Okay,

Given a runtime created DataGridView, I am trying to handle some of the clipboard /copy/paste functionality. Now, i've lookedup and found the function GetClipboardContent() as a member of the DataGridView, but there are some questions:

I gather that it returns a DataObject that I can put on the clipboard via SetDataObject(), however does it only save the "selected" cells? I know it works off the ClipboardCopyMode property, which is self-explanatory, but does that still only work on the selected cells?

Secondly, and more importantly, how can I paste a DataGridView dataobject from the clipboard back into the datagridview?

Say, i've a 5x5 grid, and I want to copy cell 2,3 and paste it to another cell, is there a function for that or do I have to handle it all manually?

Also, how do i tell teh Clipboard that I want to retrieve what I copied from the DataGridView in say, HTML, or Tab delimited format? Is that part of the DataFormats object? And do I have to set that first before copying or before pasting?

Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.