Class DataGridColumnDragDropController
Provides the base implementation for column drag-and-drop operations in SfDataGrid.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.DataGrid
Assembly: Syncfusion.Grid.WinUI.dll
Syntax
public class DataGridColumnDragDropController : Object, IDisposableRemarks
It provides the set of public properties and virtual method to customize the drag-and-drop operation.
Constructors
DataGridColumnDragDropController(SfDataGrid)
Initializes a new instance of DataGridColumnDragDropController class.
Declaration
public DataGridColumnDragDropController(SfDataGrid dataGrid)Parameters
| Type | Name | Description | 
|---|---|---|
| SfDataGrid | dataGrid | The SfDataGrid. | 
Properties
PopupContentControl
Gets the PopupContentControl for drag-and-drop operation.
Declaration
protected PopupContentControl PopupContentControl { get; }Property Value
| Type | 
|---|
| PopupContentControl | 
PopupMaxHeight
Gets or sets the maximum height constraint of the popup for drag-and-drop operation.
Declaration
public double PopupMaxHeight { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Double | The maximum height constraint of the popup. | 
PopupMaxWidth
Gets or sets the maximum width constraint of the popup for drag-and-drop operation.
Declaration
public double PopupMaxWidth { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Double | The maximum width constraint of the popup. | 
PopupMinHeight
Gets or sets the minimum height constraint of the popup for drag-and-drop operation.
Declaration
public double PopupMinHeight { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Double | The minimum height constraint of the popup. | 
PopupMinWidth
Gets or sets the minimum width constraint of the popup for drag-and-drop operation.
Declaration
public double PopupMinWidth { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Double | The minimum width constraint of the popup. | 
Methods
CanShowPopup(GridColumn)
Determines whether the popup is displayed on the specified column.
Declaration
public virtual bool CanShowPopup(GridColumn column)Parameters
| Type | Name | Description | 
|---|---|---|
| GridColumn | column | The corresponding column to decide whether the popup is displayed on it or not. | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | Returns true if the popup is displayed on the column; otherwise, false. | 
CreatePopupContent(GridColumn)
Creates the popup content for the specified column.
Declaration
protected virtual UIElement CreatePopupContent(GridColumn column)Parameters
| Type | Name | Description | 
|---|---|---|
| GridColumn | column | The corresponding column to create popup content. | 
Returns
| Type | Description | 
|---|---|
| Microsoft.UI.Xaml.UIElement | Returns the System.Windows.UIElement for the popup. | 
Dispose()
Releases all the resources used by the DataGridColumnDragDropController class.
Declaration
public void Dispose()Dispose(Boolean)
Disposes all the resources used by the DataGridColumnDragDropController class.
Declaration
protected virtual void Dispose(bool isDisposing)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | isDisposing | Indicates whether the call is from Dispose method or from a finalizer. | 
GetGroupDropAreaRect()
Gets the display rectangle for the GroupDropArea.
Declaration
protected Rect GetGroupDropAreaRect()Returns
| Type | Description | 
|---|---|
| Windows.Foundation.Rect | The display rectangle for the GroupDropArea. | 
GetHeaderRowRect()
Gets the display rectangle for the header row in SfDataGrid.
Declaration
protected Rect GetHeaderRowRect()Returns
| Type | Description | 
|---|---|
| Windows.Foundation.Rect | The display rectangle for the header row. | 
GetPopupRect()
Gets the display rectangle for the popup.
Declaration
protected Rect GetPopupRect()Returns
| Type | Description | 
|---|---|
| Windows.Foundation.Rect | The display rectangle for the popup. | 
OnColumnHiddenChanged(GridColumn)
Invoked when the IsHidden property value changes.
Declaration
protected virtual void OnColumnHiddenChanged(GridColumn column)Parameters
| Type | Name | Description | 
|---|---|---|
| GridColumn | column | The corresponding column on which the IsHidden property value changes occurs. | 
OnColumnWidthChanged(GridColumn)
Invoked when the Width property value changes.
Declaration
protected virtual void OnColumnWidthChanged(GridColumn column)Parameters
| Type | Name | Description | 
|---|---|---|
| GridColumn | column | The corresponding column on which the Width property value changes occurs. | 
OnPopupContentDropped(Point)
Invoked when the popup content dropped on SfDataGrid.
Declaration
protected virtual void OnPopupContentDropped(Point pointOverGrid)Parameters
| Type | Name | Description | 
|---|---|---|
| Windows.Foundation.Point | pointOverGrid | Indicates whether the mouse point over on SfDataGrid. | 
OnPopupContentPositionChanged(Double, Double, Point)
Invoked when the position of popup content is changed in SfDataGrid.
Declaration
protected virtual void OnPopupContentPositionChanged(double HorizontalDelta, double VerticalDelta, Point mousePointOverGrid)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Double | HorizontalDelta | The corresponding horizontal distance of the popup content position changes. | 
| System.Double | VerticalDelta | The corresponding vertical distance of the popup content position changes. | 
| Windows.Foundation.Point | mousePointOverGrid | Indicates whether the mouse point is hover on the DataGrid. | 
PointToGridRegion(Point)
Gets the corresponding GridRegion at the specified point co-ordinate value.
Declaration
public virtual GridRegion PointToGridRegion(Point point)Parameters
| Type | Name | Description | 
|---|---|---|
| Windows.Foundation.Point | point | The position to get the corresponding grid region. | 
Returns
| Type | Description | 
|---|---|
| GridRegion | Returns the corresponding GridRegion at the specified point. | 
PopupContentDroppedOnGrid(Point)
Invoked when the popup content dropped on SfDataGrid.
Declaration
protected virtual void PopupContentDroppedOnGrid(Point point)Parameters
| Type | Name | Description | 
|---|---|---|
| Windows.Foundation.Point | point | The corresponding position where the popup content is dropped in SfDataGrid. | 
PopupContentDroppedOnGroupDropArea(GridColumn)
Invoked when the popup content is dropped on the GroupDropArea in SfDataGrid.
Declaration
protected virtual void PopupContentDroppedOnGroupDropArea(GridColumn column)Parameters
| Type | Name | Description | 
|---|---|---|
| GridColumn | column | The corresponding column that is dropped to the GroupDropArea. | 
Remarks
Override this method and customize the drag-and-drop interaction between column and GroupDropArea in SfDataGrid.
PopupContentDroppedOnHeaderRow(Int32, Int32)
Invoked when the popup content is dropped on header row in SfDataGrid.
Declaration
protected virtual void PopupContentDroppedOnHeaderRow(int oldIndex, int newColumnIndex)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | oldIndex | The corresponding old index of the column before dropped the popup content on header row. | 
| System.Int32 | newColumnIndex | The new index of the column after dropped the popup content on header row. | 
Remarks
Override this method and customize the drag-and-drop interaction between columns in SfDataGrid.
ShowPopup(Int32, Rect, Pointer)
Displays the popup at the specified column index, display rectangle and position.
Declaration
public void ShowPopup(int gridColumnIndex, Rect rect, Pointer pointer)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | gridColumnIndex | The corresponding column index to show the popup. | 
| Windows.Foundation.Rect | rect | The corresponding display rectangle to show the popup. | 
| Microsoft.UI.Xaml.Input.Pointer | pointer | The corresponding position to show the popup. | 
SuspendReverseAnimation(Boolean)
Suspends the reverse animation for the popup
Declaration
protected void SuspendReverseAnimation(bool suspend)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | suspend | If set to true, then ; otherwise, . |