Gets or sets the field name in the bound data source whose contents are assigned item values of the column's picker control. This is a bindable property.
A String value that specifies the field name in a bound data source.
A picker control which appears when a column cell is in the edit mode can be populated with items from a data source. To bind the picker to a data source, use the PickerColumn.ItemsSource property. The PickerColumn.DisplayMember and ValueMember properties specify the field names in the bound data source that supply display strings and item values, respectively.
This example demonstrates how to implement the grid's PickerColumn whose items are coming from the grid's underlying data source.
In this example, a grid is bound to a collection of the Order objects. Each order contains information about a customer (the CustomerId property). A customer is represented by a Customer object that has the Id and Name properties. Customer objects are stored in an IList collection. The following properties of the PickerColumn object are set to show customer names for orders in this column within the grid (see the MainPage.xaml file):
- GridColumn.FieldName – an order's property to be bound to a column (CustomerId).
- PickerColumn.ItemsSource – a collection of customers.
- PickerColumn.ValueMember – a customer’s property used to associate a customer with an order (Id).
- PickerColumn.DisplayMember – a customer’s property to be displayed in a column (Name).