RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBaseDataSetAdapterField.GetInputStyle Method

Returns a string value that suggests an HTML editing style for this adapter field.

Pascal
function GetInputStyle(const AAdapterMode: string): string;
C++
__fastcall AnsiString GetInputStyle(const AnsiString AAdapterMode);

GetInputStyle implements the InputStyle property of this adapter field. The InputStyle property can be used in server-side script to determine an appropriate control for editing the field's value. 

AAdapterMode indicates the current mode of the parent dataset adapter. It is one of the following values:

Value 
Mode 
The HTML control is used for 
Insert  
amInsert  
Providing a field value on a newly inserted record.  
Edit  
amEdit  
Modifying an existing field value.  
Browse  
amBrowse  
Read-only viewing of an existing field value.  
Query  
amQuery  
Entering a value to use for the field in a generated query.  

GetInputStyle returns one of the following strings:

Value 
Meaning 
TextInput  
Edit the field using a single line input field.  
PasswordInput  
Edit the field as a password field.  
Select  
Edit the field using a single selection list.  
SelectMultiple  
Edit the field using a multiple selection list.  
Radio  
Edit the field using radio buttons.  
CheckBox  
Edit the field using check boxes.  
TextArea  
Edit the field using a multi-line input field.  
File  
Edit the field using a file upload input field.  

Note: Although GetInputStyle is not a virtual method, it uses the virtual GetInputStyleType method to determine what value to return. To change the way the adapter field determines the input style, override the GetInputStyleType method.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!