How to: Check a SwitchColumn by a Single Tap
Important
This documentation topic describes legacy technology. We no longer develop new functionality for the Grid
This example illustrates how to implement the SwitchColumn value changing using a single tap (not a usual approach with opening an edit row). To add this functionality, follow the steps below.
- Set the GridControl.AllowEditRows property to false to disable the grid’s editing row feature.
- Create an object (Data in this example) that implements the INotifyPropertyChanged interface and has a Boolean property (IsSelected in this example) that notifies a GridControl whether or not a corresponding cell is selected.
- Assign the DevExpress.Mobile.Core.Containers.BindingList<T> (T is the Data type in this example) collection to the GridControl.ItemsSource property.
- Subscribe to the GridControl.RowTap event and use its handler to change the Boolean property’s (from step 2) value.