Class GridNumericColumn
Represents a SfDataGrid column that hosts numeric Content in its cells.
Implements
Inherited Members
Namespace: Syncfusion.SfDataGrid.XForms
Assembly: Syncfusion.SfDataGrid.XForms.dll
Syntax
public class GridNumericColumn : GridEditorColumn, IDisposable
Remarks
Use GridNumericColumn to display columns of data in numeric format.
To create a column, add it to the Columns collection. To populate the column, bind the column to the data by using the DisplayBinding property. The Binding property is applied to the Xamarin.Forms.Label view created in the column. The Xamarin.Forms.BindableObject.BindingContext for the view in each cell is the data item for the row the cell is in. Therefore, to set up the binding you only have to set the Xamarin.Forms.Binding.Path. Optionally, you can specify a Xamarin.Forms.Binding.Converter if you want to convert the data.
Examples
<sfGrid:SfDataGrid.Columns>
<sfgrid:GridNumericColumn NumberDecimalDigits="0"
HeaderText="Product No"
MappingName="ProductNo"/>
</sfGrid:SfDataGrid.Columns>
Constructors
GridNumericColumn()
Initializes a new instance of the GridNumericColumn class.
Declaration
public GridNumericColumn()
Fields
NumberDecimalDigitsProperty
Identifies the NumberDecimalDigits Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty NumberDecimalDigitsProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
NumberDecimalSeparatorProperty
Identifies the NumberDecimalSeparator Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty NumberDecimalSeparatorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
NumberGroupSeparatorProperty
Identifies the NumberGroupSeparator Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty NumberGroupSeparatorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
NumberGroupSizesProperty
Identifies the NumberGroupSizes Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty NumberGroupSizesProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
NumberNegativePatternProperty
Identifies the NumberNegativePattern Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty NumberNegativePatternProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
ShowClearButtonProperty
Identifies the ShowClearButton Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty ShowClearButtonProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
Properties
NumberDecimalDigits
Gets or sets the number of decimal digits to be displayed after the decimal point in the numeric values.
Declaration
public int NumberDecimalDigits { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of decimal digits to be displayed after the decimal point in the numeric values. |
Examples
GridNumericColumn numericColumn = new GridNumericColumn()
{
MappingName = "ProductNo",
HeaderText = "Product No",
NumberDecimalDigits = 0
};
dataGrid.Columns.Add(numericColumn);
See Also
NumberDecimalSeparator
Gets or sets the string to use as the decimal separator in numeric values.
Declaration
public string NumberDecimalSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.String | The string to use as the decimal separator in numeric values. The default string used to separate the decimal part of the numeric value is "." operator. |
Examples
GridNumericColumn numericColumn = new GridNumericColumn()
{
MappingName = "ProductNo",
HeaderText = "Product No",
NumberDecimalSeparator = ":"
};
dataGrid.Columns.Add(numericColumn);
See Also
NumberGroupSeparator
Gets or sets the string that separates groups of digits to the left of the decimal in numeric values.
Declaration
public string NumberGroupSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.String | The string that separates groups of digits to the left of the decimal in numeric values. The default string used to separate groups of digits to the left of the decimal in numeric values is "," operator. |
Examples
GridNumericColumn numericColumn = new GridNumericColumn()
{
MappingName = "ProductNo",
HeaderText = "Product No",
NumberGroupSeparator = "'"
};
dataGrid.Columns.Add(numericColumn);
See Also
NumberGroupSizes
Gets or sets the number of digits in each group to the left of the decimal in numeric values.
Declaration
public int[] NumberGroupSizes { get; set; }
Property Value
Type | Description |
---|---|
System.Int32[] | The number of digits in each group to the left of the decimal in numeric values. |
Examples
GridNumericColumn numericColumn = new GridNumericColumn()
{
MappingName = "ProductNo",
HeaderText = "Product No",
int[] groupSizeArray = { 3 };
NumberGroupSizes = groupSizeArray,
};
dataGrid.Columns.Add(numericColumn);
See Also
NumberNegativePattern
Gets or sets the format pattern for negative numeric values.
Declaration
public int NumberNegativePattern { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The format pattern for negative numeric values. The default pattern for negative number is "-n", where 'n' represents the number. |
See Also
ShowClearButton
Gets or sets a value indicating whether to display the clear text button when the grid cell of the numeric column enters edit mode in UWP platform.
Declaration
public bool ShowClearButton { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A bool value that determines whether to display the clear text button when the grid cell of the numeric column enters edit mode in UWP platform. |
Remarks
This property is applicable only for the UWP platform.
Examples
GridNumericColumn numericColumn = new GridNumericColumn()
{
MappingName = "ProductNo",
HeaderText = "Product No",
ShowClearButton = false
};
dataGrid.Columns.Add(numericColumn);
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
SetDisplayBindingConverter()
Sets the converter for the DisplayBinding of column.
Declaration
protected override void SetDisplayBindingConverter()