How to reproduce: check the attached video
Workaround:
private void button1_Click(object sender, EventArgs e)
{
this.radPivotFieldList1.DragDropService.PreviewDragDrop += DragDropService_PreviewDragDrop;
}
IGroupDescription cache;
string group;
private void DragDropService_PreviewDragDrop(object sender, Telerik.WinControls.RadDropEventArgs e)
{
TreeNodeElement nodeElement = e.DragInstance as TreeNodeElement;
if (nodeElement != null)
{
IField field = nodeElement.Data.DataBoundItem as IField;
string draggedItem = field.FieldInfo.Name;
IGroupDescription rowDesc = this.radPivotGrid1.RowGroupDescriptions.Where(i => i.GetUniqueName() == draggedItem).FirstOrDefault();
if (rowDesc != null)
{
cache = (IGroupDescription)rowDesc.Clone();
group = "Row";
}
IGroupDescription colDesc = this.radPivotGrid1.ColumnGroupDescriptions.Where(i => i.GetUniqueName() == draggedItem).FirstOrDefault();
if (colDesc != null)
{
cache = (IGroupDescription)colDesc.Clone();
group = "Column";
}
if (cache != null)
{
this.radPivotGrid1.UpdateCompleted += radPivotGrid1_UpdateCompleted;
}
}
}
private void radPivotGrid1_UpdateCompleted(object sender, EventArgs e)
{
this.radPivotGrid1.UpdateCompleted -= radPivotGrid1_UpdateCompleted;
switch (group)
{
case "Row":
this.radPivotGrid1.RowGroupDescriptions.Add(cache);
break;
case "Column":
this.radPivotGrid1.ColumnGroupDescriptions.Add(cache);
break;
default:
break;
}
cache = null;
}