Skip to main content
All docs
V25.1
  • 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.1.dll

    NuGet Package: DevExpress.AIIntegration.Wpf

    Declaration

    public static void SetExcludeItem(
        DependencyObject dependencyObject,
        bool value
    )

    Parameters

    Name Type Description
    dependencyObject DependencyObject

    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.

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

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

    See Also