|
I'm working on fixing the command of "Copy to Clipboard" from a data
grid.
The current implementation has two problems:
1) There are two extra columns copied to clipboard that are invisible
in the grid. I'll need to remove these two columns from clipboard.
2) The headings are not being copied to clipboard.
For #1, the current implementation is:
private void mCommandCopyToClipboard_Click(object sender,
C1.Win.C1Command.ClickEventArgs e)
{
Clipboard.SetDataObject(gridReports.Clip);
}
Everthing used in this method is at the metadata level so I can't
change anything. For instance, "Clipboard" and "SetDataObject" are
defined as below:
public sealed class Clipboard
{
public static void SetDataObject(object data);
}
Any advice on what I can do to remove the two extra columns?
For #2, shall I add headings to clipboard? I personally don't think so
because only the area highlighted by the mouse should be copied to
clipboard. Since the headings can't be highlighted, they should not be
copied to clipboard. However, I would like to verify this with
knowledgable people here.
Thanks! |