Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SmartPasteBehaviorProperties.ExcludedItems Property

Gets a collection of items excluded from SmartPaste.

Namespace: DevExpress.AIIntegration.WinForms

Assembly: DevExpress.AIIntegration.WinForms.v24.2.dll

NuGet Package: DevExpress.AIIntegration.WinForms

#Declaration

[Browsable(false)]
public List<IComponent> ExcludedItems { get; }

#Property Value

Type Description
List<IComponent>

The collection of items excluded from SmartPaste.

#Remarks

To exclude a specific item from SmartPaste, add this item to the SmartPasteBehavior.Properties.ExcludedItems collection. This allows you to exclude grid columns or data fields from being affected by SmartPaste, ensuring that they remain unchanged.

public Form1()
{
    InitializeComponent();
    behaviorManager1.Attach<SmartPasteBehavior>(gridView1, behavior => {
        behavior.Properties.ItemDescriptions.AddRange(new List<AIItemDescription>() {
                new AIItemDescription(gridView1.Columns["Price"], "The cost of the product, including any applicable taxes."),
                new AIItemDescription(gridView1.Columns["ShippingWeight"], "The weight of the product when packaged for shipping (in lbs or kg)."),
                new AIItemDescription(gridView1.Columns["Dimensions"], "The physical size of the product, typically in length, width, and height."),
            }
        );
        behavior.Properties.ExcludedItems.Add(gridView1.Columns["Rating"]);
    });
}

Tip

Read the following help topic for additional information: Smart Paste AI-powered Extension.

See Also