Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Grid Row Javascript API > Methods

Grid Row Javascript API: row.getFieldText();

Scroll Prev Next More

 

Returns the field value with formatting applied. In other words, returns the HTML code of this table cell.

Syntax

row.getFieldText(field);

Arguments

field

the name of the field.

Return value

Returns the field value with formatting applied.

 

For instance, we have a Lookup Wizard field that has different Link and Display fields selected. getFieldText(field) returns the Display field value. getFieldValue(field) returns the Link field value.

Example

This example shows how to emphasize some information in the field by underlining the text.

 

Create a custom button and insert it into the data grid containing the field you want to modify.

 

Use the code below and replace the field with the field name that corresponds to your project.

 

Client Before:

 

var txt = row.getFieldText("field");
txt = "<u>"+txt+"</u>";
row.setFieldText("field",txt);

See also:

Grid Row JavaScript API: row.setFieldText()

Displaying font in different colors

Customizing CSS examples

Insert Text/HTML code

Change font size in text box

About Grid Row JavaScript API