Please enable JavaScript to view this site.

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

Grid Row Javascript API: row.setFieldText()

Scroll Prev Next More

 

Sets the HTML of the field as it appears in grid.

Syntax

row.setFieldText(field, text);

Arguments

field

the field name.

text

the HTML of the field.

Return value

No return value

Example

This example shows how to emphasize some information in the field by making the font bold.

 

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 = "<strong>"+txt+"</strong>";
row.setFieldText("field",txt);

See also:

Grid Row JavaScript API: row.getFieldText()

Displaying font in different colors

Customizing CSS examples

Insert Text/HTML code

Change font size in text box

About Grid Row JavaScript API