Back to Devexpress

TileView.ItemClick Event

windowsforms-devexpress-dot-xtragrid-dot-views-dot-tile-dot-tileview-622e62cc.md

latest2.6 KB
Original Source

TileView.ItemClick Event

Occurs when a user clicks a tile, or presses the Space or Enter keyboard keys.

Namespace : DevExpress.XtraGrid.Views.Tile

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
[DXCategory("Action")]
public event TileViewItemClickEventHandler ItemClick
vb
<DXCategory("Action")>
Public Event ItemClick As TileViewItemClickEventHandler

Event Data

The ItemClick event's data class is DevExpress.XtraGrid.Views.Tile.TileViewItemClickEventArgs.

Remarks

The ItemClick event fires when a user presses and then releases a tile. The event is also raised when the Space or Enter keyboard keys are pressed.

If your users use touch screens, and you want to handle the ItemClick event to display a modal window when a user taps on a touch screen, wrap your code that displays the modal window within the Control.BeginInvoke method. For example, you can use the following code:

csharp
private void tileView1_ItemClick(object sender, DevExpress.XtraGrid.Views.Tile.TileViewItemClickEventArgs e) {
    this.BeginInvoke(new MethodInvoker(delegate {
        (new Form2()).ShowDialog();
    }));
}
vb
Private Sub TileView1_ItemClick(sender As Object, e As DevExpress.XtraGrid.Views.Tile.TileViewItemClickEventArgs) Handles TileView1.ItemClick
    Me.BeginInvoke(New MethodInvoker(Sub()
                                         Call (New Form2()).ShowDialog()
                                     End Sub))
End Sub

See Also

ItemDoubleClick

ItemRightClick

ItemPress

TileView Class

TileView Members

DevExpress.XtraGrid.Views.Tile Namespace