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:
•Page Designer. Working with elements
•About Grid Row JavaScript API