Grid Column Example
This example adds a combo box to the Department column in a list of employees. It assumes an employee list called #EMPLIST containing a #DEPTMENT column and a department list called #DEPTS containing #DEPTMENT and #DEPTDESC.
1. Add a grid to the Webroutine design and set its property to EMPLIST.
2. Modify the property and select the Customize Column option for the column.
3. Drag a combo box weblet onto the first non-header cell of the column.
4. Set the property of the dropdown to DEPTS.
5. Set the property to DEPTMENT and the property to DEPTDESC. Your grid should be looking something like this:
Notice that the property contains a single period (.). This indicates that the value for the combo box should be the value of the current column of the list.
Notice, also, that the property is set to $tsml_col_mode. This is a special XSLT variable used inside the grid to indicate the display mode defined in the DEF_LIST.
Now an action will be added to the combo box to execute a Webroutine when a value is changed. The Webroutine, UpdateDepartment, takes two inputs: and .
6. Set the property of the combo box to UpdateDepartment.
7. Set the property of the combo box to DEPTMENT. This tells the combo box to submit the selected value of the column (in the list).
8. Set the property of the combo box to EMPNO and set the property to ../lxml:column[@name='EMPNO']. As this is an XPath expression you must use the XPath entry area at the bottom of the details tab to enter the value. This tells the combo box to get the value of the EMPNO column of the grid and submit it in a field called EMPNO.