New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

When in browser mode, GridNumericColumn looks and behaves like a standard GridBoundColumn. When in edit mode, however, it displays a RadNumericTextBox control. This column type is for numeric values. Its DataField property must identify a field with a valid data type (Number or Decimal). This column type is editable (implements the IGridEditableColumn interface) and by default provides GridNumericColumnEditor as its column editor.

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class GridNumericColumn : GridBoundColumn, IStateManager, IComparable, IGridEditableColumn, IGridDataColumn

Inheritance: objectGridColumnGridEditableColumnGridBoundColumnGridNumericColumn

Implements: IComparableIGridDataColumnIGridEditableColumnIStateManager

Inherited Members GridBoundColumn.formattingGridBoundColumn.thisExprGridBoundColumn.Initialize()GridBoundColumn.InitializeCell(TableCell, int, GridItem)GridBoundColumn.ColumnEditorChange(IGridColumnEditor)GridBoundColumn.SupportsFiltering()GridBoundColumn.GetFilterDataField()GridBoundColumn.GetDefaultGroupByExpression()GridBoundColumn.IsBoundToFieldName(string)GridBoundColumn.GenerateUniqueName()GridBoundColumn.FillValues(IDictionary, GridEditableItem)GridBoundColumn.GetCustomPropertyDataFields(object)GridBoundColumn.DataFieldGridBoundColumn.ColumnValidationSettingsGridBoundColumn.AggregateGridBoundColumn.HtmlEncodeGridBoundColumn.EmptyDataTextGridBoundColumn.FooterAggregateFormatStringGridBoundColumn.MaxLengthGridBoundColumn.DataFormatStringGridBoundColumn.IsEditableGridEditableColumn.SetDefaultColumnEditor(IGridColumnEditor)GridEditableColumn.GetEditableColumn()GridEditableColumn.ShouldExtractValues(GridEditableItem)GridEditableColumn.ConvertValueIfEmpty(string)GridEditableColumn.GetActiveDataField()GridEditableColumn.ColumnEditorIDGridEditableColumn.MobileEditorGridEditableColumn.CurrentColumnEditorGridEditableColumn.InnerColumnEditorGridEditableColumn.ColumnEditorGridEditableColumn.ConvertEmptyStringToNullGridEditableColumn.UseNativeEditorsInMobileModeGridEditableColumn.DefaultInsertValueGridEditableColumn.ReadOnlyGridEditableColumn.InsertVisiblityModeGridEditableColumn.ForceExtractValueGridEditableColumn.AllowSortingGridEditableColumn.SortableGridEditableColumn.AllowFilteringGridColumn.ShouldSerializeFilterImageUrl()GridColumn.ShouldSerializeSortAscImageUrl()GridColumn.ShouldSerializeSortDescImageUrl()GridColumn.EvaluateFilterExpression(GridFilteringItem)GridColumn.EvaluateFilterExpression()GridColumn.FunctionTakesNoArguments(GridKnownFunction)GridColumn.GetFilterFunctionsList(GridFilterListOptions, ArrayList)GridColumn.PrepareCell(TableCell, GridItem)GridColumn.LoadViewState(object)GridColumn.OnColumnChanged()GridColumn.SaveViewState()GridColumn.TrackViewState()GridColumn.ResetCurrentFilterValue(GridFilteringItem)GridColumn.ResetCurrentFilterValue()GridColumn.IsUniqueName(string)GridColumn.GenerateUniqueNameBase(string)GridColumn.TrySetOnClientClickScript(Control, GridItem, string, params string[])GridColumn.UpdateUniqueNameIfDefault(string)GridColumn.HeaderTooltipGridColumn.HeaderAbbrGridColumn.HeaderAxisGridColumn.SortedBackColorGridColumn.CurrentFilterValueGridColumn.AndCurrentFilterValueGridColumn.ColumnGroupNameGridColumn.SelectedGridColumn.SelectableGridColumn.CurrentFilterFunctionGridColumn.AndCurrentFilterFunctionGridColumn.FilterDelayGridColumn.ExportableGridColumn.EnableHeaderContextMenuGridColumn.ShowFilterIconGridColumn.FilterListOptionsGridColumn.AutoPostBackOnFilterGridColumn.FilterImageToolTipGridColumn.FilterControlToolTipGridColumn.EditorControlToolTipGridColumn.FilterImageUrlGridColumn.SortAscImageUrlGridColumn.SortDescImageUrlGridColumn.DataTypeNameGridColumn.ListOfFilterValuesGridColumn.FilterTemplateGridColumn.TableViewSpecificStateGridColumn.DesignModeGridColumn.FooterStyleGridColumn.FooterTextGridColumn.HeaderImageUrlGridColumn.HeaderStyleGridColumn.HeaderTextGridColumn.IsTrackingViewStateGridColumn.ItemStyleGridColumn.OwnerGridColumn.SortExpressionGridColumn.GroupByExpressionGridColumn.ViewStateGridColumn.ShowSortIconGridColumn.ShowNoSortIconGridColumn.VisibleGridColumn.DisplayGridColumn.OwnerIDGridColumn.OwnerGridIDGridColumn.ResizableGridColumn.ReorderableGridColumn.GroupableGridColumn.ColumnTypeGridColumn.HeaderButtonTypeGridColumn.OrderIndexGridColumn.IsDefaultUniqueNameGridColumn.EditFormColumnIndexGridColumn.UniqueNameGridColumn.EditFormHeaderTextFormatGridColumn.DataTypeGridColumn.FilterControlWidthGridColumn.FilterControlAltTextGridColumn.FilterCheckListWebServiceMethodGridColumn.FilterCheckListEnableLoadOnDemandobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
[SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public GridNumericColumn()

Properties

Gets or sets whether the GridNumericColumn should autocorrect out of range values to valid values

C#
public bool AllowOutOfRangeAutoCorrect { get; set; }
Property Value:

The default value is true

Gets or sets the NumberFormat.AllowRounding property of the RadNumericTextBox control.

C#
public bool AllowRounding { get; set; }
Property Value:

The NumberFormat.AllowRounding property of the RadNumericTextBox control.

Gets or sets a value indicating the multiplication factor.

C#
public double DbValueFactor { get; set; }

Gets or sets the NumberFormat.DecimalDigits property of the RadNumericTextBox control.

C#
public int DecimalDigits { get; set; }
Property Value:

The NumberFormat.DecimalDigits property of the RadNumericTextBox control.

Gets or sets the NumberFormat.KeepNotRoundedValue property of the RadNumericTextBox control.

C#
public bool KeepNotRoundedValue { get; set; }
Property Value:

The NumberFormat.KeepNotRoundedValue property of the RadNumericTextBox control.

Gets or sets the largest possible value of a GridNumericColumn.

C#
public virtual double MaxValue { get; set; }
Property Value:

The default value is positive 2^46.

Gets or sets the smallest possible value of a GridNumericColumn.

C#
public virtual double MinValue { get; set; }
Property Value:

The default value is negative -2^46.

Type of object that is used to wrap the DbValue property.

C#
public Type NumericDataType { get; set; }
Property Value:

Default value is set to the Double.

Gets or sets the NumericType property of the RadNumericTextBox control.

C#
public NumericType NumericType { get; set; }
Property Value:

The NumericType property of the RadNumericTextBox control.

Gets or sets a value indicating whether the button is displayed in the RadInput control.

C#
public virtual bool ShowSpinButtons { get; set; }
Property Value:

true if the button is displayed; otherwise, false. The default value is true

Methods

Creates a copy of the current column.

C#
public override GridColumn Clone()
Returns:

GridColumn

Overrides: GridBoundColumn.Clone()

Note: When implementing/overriding this method be sure to call the base member or call CopyBaseProperties to be sure that all base properties will be copied accordingly

C#
protected override void CopyBaseProperties(GridColumn fromColumn)
Parameters:fromColumnGridColumn

Overrides: GridBoundColumn.CopyBaseProperties(GridColumn)

C#
protected override IGridColumnEditor CreateDefaultColumnEditor()
Returns:

IGridColumnEditor

Overrides: GridBoundColumn.CreateDefaultColumnEditor()

C#
protected override string FormatDataValue(object dataValue, GridItem item, bool formatEvenIfReadOnly)
Parameters:dataValueobjectitemGridItemformatEvenIfReadOnlyboolReturns:

string

Overrides: GridBoundColumn.FormatDataValue(object, GridItem, bool)

C#
protected override string FormatDataValue(object dataValue, GridItem item)
Parameters:dataValueobjectitemGridItemReturns:

string

Overrides: GridBoundColumn.FormatDataValue(object, GridItem)

Gets the value of the Text property of a textbox control found in the cell, used to set the value of the CurrentFilterValue property.

C#
[SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Double.ToString")]
protected override string GetCurrentFilterValueFromControl(TableCell cell)
Parameters:cellTableCellReturns:

string

Overrides: GridColumn.GetCurrentFilterValueFromControl(TableCell)

C#
protected virtual string GetCurrentFilterValueFromControlCultureSpecific(TableCell cell)
Parameters:cellTableCellReturns:

string

Modifies the CurrentFilterFunction and CurrentFilterValue properties according to the function given and the corresponding filter text-box control in the filtering item.

C#
public override void RefreshCurrentFilterValue(GridFilteringItem filteringItem, string functionName)
Parameters:filteringItemGridFilteringItemfunctionNamestring

Overrides: GridColumn.RefreshCurrentFilterValue(GridFilteringItem, string)

Modifies the CurrentFilterValue property according to the corresponding selected item in the filter text-box control in the filtering item.

C#
public override void RefreshCurrentFilterValue(GridFilteringItem filteringItem)
Parameters:filteringItemGridFilteringItem

Overrides: GridColumn.RefreshCurrentFilterValue(GridFilteringItem)

Sets the value of the property CurrentFilterValue as a text on the TextBox control found in the cell

C#
protected override void SetCurrentFilterValueToControl(TableCell cell)
Parameters:cellTableCell

Overrides: GridColumn.SetCurrentFilterValueToControl(TableCell)

Instantiates the filter controls (text-box, image.) in the cell given

C#
protected override void SetupFilterControls(TableCell cell)
Parameters:cellTableCell

Overrides: GridColumn.SetupFilterControls(TableCell)