In WPF PivotGridControl, drag-and-drop functionality for rows, columns, and filters can be disabled by setting the AllowDrop property to false within the GroupingBar Loaded event.
pivotGrid.Loaded += OnLoaded;
private void OnLoaded(object sender, RoutedEventArgs e)
{
//Event subscription
pivotGrid.GroupingBar.Loaded += OnGroupingBarLoaded;
}
// Event customization
private void OnGroupingBarLoaded(object sender, RoutedEventArgs e)
{
// To disable drag and drop for the rows on RowHeaderArea
pivotGrid.GroupingBar.RowHeaderArea.AllowDrop = false;
// To disable drag and drop for the columns on ColumnHeaderArea
pivotGrid.GroupingBar.ColumnHeaderArea.AllowDrop = false;
// To disable drag and drop for the data on DataHeaderArea
pivotGrid.GroupingBar.DataHeaderArea.AllowDrop = false;
// To disable drag and drop on FilterHeaderArea
pivotGrid.GroupingBar.FilterHeaderArea.AllowDrop = false;
}Take a moment to peruse the WPF PivotGridControl - GroupingBar documentation, where you can find about the GroupingBar with code examples.
