Back to Devexpress

SmartPasteBehavior.SetExcludeItem(DependencyObject, Boolean) Method

wpf-devexpress-dot-aiintegration-dot-wpf-dot-smartpastebehavior-dot-setexcludeitem-x28-system-dot-windows-dot-dependencyobject-system-dot-boolean-x29.md

latest2.4 KB
Original Source

SmartPasteBehavior.SetExcludeItem(DependencyObject, Boolean) Method

Sets the value of the SmartPasteBehavior.ExcludeItem attached property to the specified SmartPasteBehavior. Use this method to exclude an item (for example, a grid column or layout item) from SmartPaste in code behind.

Namespace : DevExpress.AIIntegration.Wpf

Assembly : DevExpress.AIIntegration.Wpf.v25.2.dll

NuGet Package : DevExpress.AIIntegration.Wpf

Declaration

csharp
public static void SetExcludeItem(
    DependencyObject dependencyObject,
    bool value
)
vb
Public Shared Sub SetExcludeItem(
    dependencyObject As DependencyObject,
    value As Boolean
)

Parameters

NameTypeDescription
dependencyObjectDependencyObject

The item (a grid/treelist column or layout item).

| | value | Boolean |

true to exclude the item from SmartPaste; otherwise, false.

|

Remarks

Use the ExcludeItem attached property or SetExcludeItem method to exclude a specific item from SmartPaste. This allows you to exclude columns or layout items from being affected by SmartPaste, ensuring that they remain unchanged.

csharp
SmartPasteBehavior.SetExcludeItem(gridControl.Columns["OrderID"], true);

Refer to the following help topic for additional information and examples: Smart Paste.

See Also

SmartPasteBehavior Class

SmartPasteBehavior Members

DevExpress.AIIntegration.Wpf Namespace