【发布时间】:2012-06-19 19:59:14
【问题描述】:
我正在为同步融合网格控件进行复制粘贴。
我的问题是粘贴而不是同步融合
我的数据采用 datetime-int、datetime-int... 格式,具体取决于所选的行数、列数。 这是我的粘贴代码
private void theGrid_ClipboardPaste(object sender, GridCutPasteEventArgs e)
{
DataObject data = (DataObject)Clipboard.GetDataObject();
try
{
if (data.GetDataPresent(DataFormats.Text))
{
rowsInClipboard = stringInClipboard.Split('\n');
//split into cellvalues
for (int iRow = 0; iRow < rowsInClipboard.Length; iRow++)
ValuesInrows = rowsInClipboard[iRow].Split('\t');
...}
我将如何验证从剪贴板粘贴到网格的数据。如果我做一个自定义格式会有帮助吗? 我还需要根据列访问剪贴板数据。
谢谢 孙
【问题讨论】:
标签: c#