Skip to main content

TileView.ContextButtonCustomize Event

Allows you to customize context buttons for individual TileView tiles.

Namespace: DevExpress.XtraGrid.Views.Tile

Assembly: DevExpress.XtraGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation


[DXCategory("Context Buttons")]
public event TileViewContextButtonCustomizeEventHandler ContextButtonCustomize

Event Data

The ContextButtonCustomize event's data class is TileViewContextButtonCustomizeEventArgs. The following properties provide information specific to this event:

Property Description
Item Gets the currently processed context button.
RowHandle Gets the row handle of the currently processed tile.


By default, all TileView tiles display the same context buttons with equal settings. Handle the ContextButtonCustomize event to override these global settings. Use the e.RowHandle parameter to get the current data row (and thus, the current tile) and the e.Item parameter to get and modify the current context button.

The code below hides all context buttons for all tiles that represent odd data rows.

private void tileView1_ContextButtonCustomize(object sender, DevExpress.XtraGrid.Views.Tile.TileViewContextButtonCustomizeEventArgs e) {
    if (e.RowHandle % 2 == 0) e.Item.Visibility = DevExpress.Utils.ContextItemVisibility.Hidden;

See the TileView.ContextButtons property for details.

See Also