Infragistics(R) NetAdvantage(R) WPF
EditAsType Property
See Also  Example E-mail your feedback on this topic.
Infragistics.Windows.DataPresenter Namespace > FieldSettings Class : EditAsType Property

Gets/sets a type that will be used to edit the data while in edit mode.


Visual Basic (Declaration) 
Public Property EditAsType As Type
public Type EditAsType {get; set;}


The follow sample demonstrates initializing the EditorType of a specific field's Settings so that it should use a XamCurrencyEditor. The EditAsType would only need to be initialized if the DataType of the Field differs from how the value should be interpretted. For example, if the control was bound to an xml data source where the schema was not defined and the type was intrepretted as string.
XAMLCopy Code
DataSource="{Binding Source={StaticResource OrdersDataSource}, XPath=Order}">
<igDP:Field Name="Title" Column="0"/>
<igDP:Field Name="Price" Column="1">
EditorType="{x:Type igEditors:XamCurrencyEditor}" 
EditAsType="{x:Type sys:Decimal}" />


This might be used with a field whose underlying datatype is 'string' or 'object' but where it should be edited as another type, e.g. a DateTime or double.

Refer to the Editors topic in the Developer's Guide for an explanation of editors.

Refer to the Editing Cell Values topic in the Developer's Guide for an explanation of how editing works.

See Also