Skip to main content

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

TcxGetFilterImagesEvent Type

The procedural type for filter image retrieval events.

#Declaration

Delphi
TcxGetFilterImagesEvent = procedure(Sender: TObject; AValueList: TcxFilterValueList; var AImages: TCustomImageList) of object;

#Parameters

Name Type Description
Sender TObject

The grid item that raised a filter image retrieval event.

AValueList TcxFilterValueList

The list of all items in the filter pop-up window. You can use this parameter to explicitly assign specific images to individual filter items as demonstrated in the code example below.

AImages TCustomImageList

Specifies the new image source for filter items. You can pass nil (in Delphi) or nullptr (in C++Builder) as the AImages parameter to hide automatically displayed filter images.

#Remarks

A grid item’s filter pop-up window automatically displays images for filter items if the grid item uses a TcxImageComboBox instance as an in-place editor.

Automatically Displayed Filter Item Images

You can handle filter image retrieval events to assign images to all or specific filter items. A filter item has the ImageIndex property that specifies the displayed image’s index in the source image list (AImages or the default image source).

#Code Example: Reverse Filter Item Order

The following code example reverses the order of automatically displayed filter items:

procedure TMyForm.vgOrdersPaymentTypeGetFilterImages(
  Sender: TObject; AValueList: TcxFilterValueList;
  var AImages: TCustomImageList);
var
  I: Integer;
begin
  for I := 0 to AValueList.Count - 1 do
    AValueList.Items[I].ImageIndex := AValueList.Count - 1 - I;
end;

Note

To display no image for a specific filter item, set its ImageIndex property to -1.

The following events reference the TcxGetFilterImagesEvent procedural type:

TcxCustomEditorRowProperties.OnGetFilterImages
Allows you to replace images displayed in an edit row’s filter pop-up window.
TcxCustomInplaceEditContainer.OnGetFilterImages
Allows you to replace images displayed in a grid item’s filter pop-up window.
See Also