dof,你好,你f给我的这个是C1FlexGrid 与 C1Schedule之间的拖拽。你以前给我做的那个demo是C1FlexGrid 与fpSpread1节点拖拽,并且我按照那个代码试了下,在如下代码中并没有e.Data.GetDataPresent(typeof(C1.C1Schedule.Appointment))
以下是之前你做的demo找哦你的
void fpSpread1_DragDrop(object sender, DragEventArgs e)
{
Point point = fpSpread1.PointToClient(Control.MousePosition);
if (e.Data.GetDataPresent(DataFormats.Text) && CheckCursorInCell(point.X, point.Y))
{
HitTestInformation hi = fpSpread1.HitTest(point.X, point.Y);
if (hi.ViewportInfo.Column != 0)
{
FarPoint.Win.Spread.Model.CellRange cr = fpSpread1.ActiveSheet.Models.Span.Find(hi.ViewportInfo.Row, hi.ViewportInfo.Column);
fpSpread1.ActiveSheet.Cells[cr.Row, cr.Column].Value = e.Data.GetData(DataFormats.Text);
fpSpread1.ActiveSheet.Cells[cr.Row, cr.Column].BackColor = Color.Wheat;
}
}
麻烦帮忙解决下噢,放假前要纳品了 |