Skip to main content

How to: Check a SwitchColumn by a Single Tap

Important

This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.

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.

  1. Set the GridControl.AllowEditRows property to false to disable the grid’s editing row feature.
  2. 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.
  3. Assign the DevExpress.Mobile.Core.Containers.BindingList<T> (T is the Data type in this example) collection to the GridControl.ItemsSource property.
  4. Subscribe to the GridControl.RowTap event and use its handler to change the Boolean property’s (from step 2) value.