Back to Devexpress

ExcelFilteringDataEventArgs.HtmlImages Property

windowsforms-devexpress-dot-xtraeditors-dot-filtering-dot-excelfilteringdataeventargs-1d9bcc55.md

latest3.0 KB
Original Source

ExcelFilteringDataEventArgs.HtmlImages Property

Gets or sets a collection of images to be inserted into filter item captions using HTML tags. This property is in effect when the HTML formatting feature is enabled for filter item captions.

Namespace : DevExpress.XtraEditors.Filtering

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public object HtmlImages { get; set; }
vb
Public Property HtmlImages As Object

Property Value

TypeDescription
Object

An image collection (DevExpress.Utils.ImageCollection or DevExpress.Utils.SvgImageCollection).

|

Remarks

You can format captions of custom filter conditions (see ExcelFilteringDataEventArgs.AddFilter) using a set of simplified HTML tags.

When you compose an HTML string, you can use the image tag to insert an image from an image collection and project’s resources into the text.

To insert an image from an image collection, do the following:

  • Create an image collection (ImageCollection or SvgImageCollection) and populate it with images.

  • Assign the collection to the HtmlImages property.

  • When you use the image tag, address a target image by its name (image names can be obtained from the image collection).

  • C#

  • VB.NET

csharp
e.HtmlImages = new DevExpress.Utils.ImageCollection();
e.HtmlImages.AddImage(new System.Drawing.Bitmap("D:\\pic.png"), "pic");
if(e.Column == bcModification) {
    e.AddFilter("<image=pic><nbsp>Automatic Transmission (6-speed)", "Contains([" + fieldName + "], '6A')", true);
}
vb
e.HtmlImages = New DevExpress.Utils.ImageCollection
e.HtmlImages.AddImage(New System.Drawing.Bitmap("D:\\pic.png"), "pic")
If e.Column = bcModification Then
    e.AddFilter("<image=pic><nbsp>Automatic Transmission (6-speed)", "Contains([" & e.Column.FieldName & "], '6A')", True)
End If

See Also

HTML-inspired Text Formatting

ExcelFilteringDataEventArgs Class

ExcelFilteringDataEventArgs Members

DevExpress.XtraEditors.Filtering Namespace