Class GridPickerColumn
Represents a SfDataGrid column that hosts Syncfusion.SfDataGrid.Renderers.GridPicker in its cells.
Implements
Inherited Members
Namespace: Syncfusion.SfDataGrid
Assembly: Syncfusion.SfDataGrid.iOS.dll
Syntax
public class GridPickerColumn : GridColumn, IDisposable
Remarks
Use GridPickerColumn to display columns of picker data as a Syncfusion.SfDataGrid.Renderers.GridPicker.
To create a column, add it to the Columns collection. To populate the column, assign the column to the date time data by using the MappingName property. The value is applied to each and every UIKit.UILabel view created in the column. Upon editing it displays Syncfusion.SfDataGrid.Renderers.GridPicker for editing values.
Constructors
GridPickerColumn()
Initializes a new instance of the GridPickerColumn class.
Declaration
public GridPickerColumn()
Properties
DisplayMemberPath
Gets or sets the display member path that associates the column with a property in the data source. The property of the collection binded to the display member path will be the content of the grid cell in normal and editing mode. The value will be displayed in the grid cell only when the MappingName is equal to the ValueMemberPath, else the grid cell will be blank. But the value corresponding to the given property in the data source will be displayed in the picker in edit mode.
Declaration
public string DisplayMemberPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The display member path that associates the column with a property in the data source. |
Examples
GridPickerColumn pickerColumn = new GridPickerColumn()
{
MappingName = "OrderID",
DisplayMemberPath = "EmployeeID",
ValueMemberPath = "OrderID",
ItemsSource = viewmodel.PickerInfo
};
See Also
ItemsSource
Gets or sets the items source of the GridPickerColumn. The user can create a GridPickerColumn and set its ItemsSource property to a simple collection to display the collection items in the picker drop down.
Declaration
public IEnumerable ItemsSource { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.IEnumerable | The data source for the picker. |
Examples
GridPickerColumn pickerColumn = new GridPickerColumn()
{
BindingContext = viewModel,
ItemsSource = viewModel.CustomerNames,
};
See Also
Title
Gets or sets the title of the GridPickerColumn.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String | The title of the GridPickerColumn. |
Examples
GridPickerColumn pickerColumn = new GridPickerColumn()
{
BindingContext = viewModel,
ItemsSource = viewModel.CustomerNames,
Title = "Customer Names"
};
ValueMemberPath
Gets or sets the value member path of the GridPickerColumn that associates the column with a property in the data source. The column in the Columns collection whose MappingName is equal to the value member path, will be updated with the corresponding value for the selected item in the picker, when editing in the GridPickerColumn is ended.
Declaration
public string ValueMemberPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The value member path that associates the column with a property in the data source. |
Examples
GridPickerColumn pickerColumn = new GridPickerColumn()
{
MappingName = "OrderID",
DisplayMemberPath = "EmployeeID",
ValueMemberPath = "OrderID",
ItemsSource = viewmodel.PickerInfo
};
See Also
Methods
GetFormattedValue(Object)
Gets the Formatted value for the content of a record cell in the column based on the Format and CultureInfo of the column.
Declaration
public override object GetFormattedValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The actual value of the record cell in the column. |
Returns
Type | Description |
---|---|
System.Object | The formatted value based on the Format and CultureInfo properties of the column. |
Overrides
Events
Closed
Event that provides values of the picker when DONE or OK button is clicked.
Declaration
public event EventHandler<PickerClosedEventArgs> Closed
Event Type
Type |
---|
System.EventHandler<PickerClosedEventArgs> |
Examples
pickerColumn.Closed += pickerColumn_Closed;
void pickerColumn_Closed(object sender, PickerClosedEventArgs e)
{
//You can achieve your requirement here.
}