RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBaseDataSetAdapterField.GetDisplayStyle Method

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

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

GetDisplayStyle implements the DisplayStyle property of this adapter field. The DisplayStyle property can be used in server-side script to determine an appropriate control for displaying 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.  

GetDisplayStyle returns one of the following strings:

Value 
Meaning 
Text  
Display the field as read-only text  
Image  
Display the field as an image  
List  
Display the field as a list of read only values  

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

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