Please enable JavaScript to view this site.

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

Grid Row Javascript API: row.recordId() 

Scroll Prev Next More

 

Returns the record ID.

 

Note: Record ID is a numeric identifier of a record in the grid. It is used to control elements like buttons or Inline edit controls in a specific row.

Syntax

row.recordId()

Arguments

No arguments.

Return value

Returns the record ID. This record ID is the same as pageid parameter in Javascript Controls API and you can use it to access Edit controls of any record in Inline Edit or in Spreadsheet mode.

Example 1

Show/hide edit button in the current row

 

pageObj.toggleItem( 'grid_edit', false, row.recordId() );

 

Example 2

 

Set the value of the 'name' field control in the Inline Edit mode

 

var ctrl = Runner.getControl( row.recordId(), 'name' ');
ctrl.setValue('Luke Skywalker');

 

Example 3

 

Imitate Edit button click of the specific record

 

RunnerPage.getItemButton( 'grid_edit', row.recordId() ).click();

See also:

JavaScript API: RunnerPage object > toggleItem()

JavaScript API: SearchField object > getControl()

JavaScript API: RunnerPage object > getItemButton(itemId, recordId)

JavaScript API: Control object > setValue()

JavaScript API: Date Control API > setValue()

About Grid Row JavaScript API

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software