Occurs before a swipe button is shown when an end-user swipes left to right, or right to left, over a data row.
public event SwipeButtonShowingEventHandler SwipeButtonShowing
Public Event SwipeButtonShowing As SwipeButtonShowingEventHandler
The SwipeButtonShowing event's handler receives an argument of the SwipeButtonShowingEventArgs type. The following properties provide information specific to this event:
|IsVisible||Gets or sets the swipe button visibility.|
Handle the SwipeButtonShowing event and set the e.IsVisible property to false to restrict a swipe button added to the GridControl.LeftSwipeButtons or GridControl.RightSwipeButtons collection from being displayed when an end-user swipes left to right, or right to left, over a data row.
This example shows how to extend the grid’s UI with additional buttons to be shown when an end-user swipes left to right, or right to left, over a data row – Swipe Buttons. To create a swipe button, add a SwipeButtonInfo object to the GridControl.LeftSwipeButtons or GridControl.RightSwipeButtons collection. Use this object's SwipeButtonInfo.Caption, SwipeButtonInfo.Width, SwipeButtonInfo.BackgroundColor and SwipeButtonInfo.TextColor properties to specify button appearance.
In the example, two swipe buttons are created.
When an end-user swipes any data row left to right, the Day button is shown on the left side of the row. Tapping this button displays the day of the week when the corresponding order was made.
When an end-user swipes right to left, a data row which corresponds to an order that is already shipped (the value in the Shipped column is true), the Delete button is shown on the right side of the row. Tapping this button removes the corresponding data row.