Class GridPickerColumn

    Show / Hide Table of Contents

    Class GridPickerColumn

    Represents a SfDataGrid column that hosts Syncfusion.SfDataGrid.Renderers.GridPicker in its cells.

    Inheritance
    System.Object
    GridColumn
    GridPickerColumn
    Implements
    System.IDisposable
    Inherited Members
    GridColumn.SetGrid(SfDataGrid)
    GridColumn.CanEditCell()
    GridColumn.Dispose()
    GridColumn.Dispose(Boolean)
    GridColumn.ColumnSizer
    GridColumn.LineBreakMode
    GridColumn.HeaderTemplate
    GridColumn.ActualWidth
    GridColumn.LoadUIView
    GridColumn.MappingName
    GridColumn.HeaderText
    GridColumn.UserCellType
    GridColumn.AllowSorting
    GridColumn.Format
    GridColumn.CultureInfo
    GridColumn.HeaderTextMargin
    GridColumn.TextMargin
    GridColumn.HeaderCellTextSize
    GridColumn.CellTextSize
    GridColumn.RecordFont
    GridColumn.HeaderFont
    GridColumn.TextAlignment
    GridColumn.HeaderTextAlignment
    GridColumn.AllowEditing
    GridColumn.GroupMode
    GridColumn.CellType
    GridColumn.IsHidden
    GridColumn.Width
    GridColumn.MinimumWidth
    GridColumn.MaximumWidth
    GridColumn.SortMode
    Namespace: Syncfusion.SfDataGrid
    Assembly: Syncfusion.SfDataGrid.Android.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 Android.Widget.TextView 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
    https://help.syncfusion.com/xamarin-android/sfdatagrid/column-types#displaymemberpath

    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
    https://help.syncfusion.com/xamarin-android/sfdatagrid/column-types#gridpickercolumn

    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
    https://help.syncfusion.com/xamarin-android/sfdatagrid/column-types#valuememberpath

    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
    GridColumn.GetFormattedValue(Object)

    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 Description
    System.EventHandler<PickerClosedEventArgs>
    Examples
    pickerColumn.Closed += pickerColumn_Closed;
    
    void pickerColumn_Closed(object sender, PickerClosedEventArgs e)
    {
    //You can achieve your requirement here.
    }

    Implements

    System.IDisposable

    See Also

    https://help.syncfusion.com/xamarin-android/sfdatagrid/column-types#gridpickercolumn
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved