Please enable JavaScript to view this site.

Navigation: » No topics above this level «

Hide buttons in some rows of the datagrid

Scroll Prev Next More

 

Let's say you added a button to the datagrid to export a single record. If the record has already been exported (value of the 'exported' field equals 1), you want to hide the export button in this row.

 

1. Switch to HTML mode in Editor and add wrappers around button's code. Here is a sample code:

 

{BEGIN MyButton}
  <A class="rnr-button button" id="MyButton" href="#" typeid="ib">
     MyButton
  </A>
{END MyButton}

 

2. Now in the List page: AfterRecordProcessed event add the following code:

 

if (data["exported"] != 1)
{
  record["MyButton"] = true;
}

 

Note: This code displays the button only if the value of the 'exported' field equals 1.

See also:

RunnerPage class: hideItem()

Insert standard button

Page Designer. Working with elements

Customizing CSS

JavaScript API: toggleItem()

About Grid Row JavaScript API

rowData object