Here is an example of creating a custom template in WebClient.

WebClient Ajax grids use a standard Plex model where the user highlights the row to operate on, and then presses a button to drill into other functions. What if you want to use a link model to accomplish the same thing?

Here is an example of a custom grid template that will give you that classic HTML table look with an embedded link in the table:

 

/(!CSSInit)
table th {
background-color: #eeeecc;
border-bottom: 1px solid blue;
}
/(!CSSInit)

 

<table style=”/(!DefaultCSS:nc:withPos=/(!Param:default))”>
<tr>
/(!AttachPoint:name=ColumnsArea:inlinetemplate)
<th>
/(!Text)
</th>
/(!AttachPoint)

     <th>&nbsp;</th>
</tr>

 

  /(!This)
<tr>
/(!AttachPoint:name=CellsArea:inlinetemplate)
<td>
/(!Template)
</td>
/(!AttachPoint)

      <td>
<a href=”#” onclick=”
dojo.xhrGet({
form: mainform,
content: { _type: ‘json’, /(!NameID): /(ROWNUM), ctlact: ‘Changebutton:Pressed’, pnlid: pnlid },
load: function(data, ioArgs) {
data.main(data);
},
preventCache: true,
handleAs: ‘json’
});
“>Edit Details</a>
</td>
</tr>
/(!This)
</table>

If you save this template as TableGrid.ctrl, place it on the classpath, then you can reference by setting the control name of the grid as follows:

 

Grid1P:MainArea:template=TableGrid:default

 

The “Edit Details” grid link will send the Pressed physical event to the button named Changebutton.