I have a grid where one column is a column of hyperlinks. How can I set the field labels to display the field's value, while keeping the column's label fixed?
Asked
Active
Viewed 1,908 times
1 Answers
1
You do this in two steps
- set the Grid Column Label
- For each row in the grid assign a value to the label of the field associated with the button
Ensure on the page that you have set the page field value for the grid and for the hyperlink column
The example below assumes the field associated with the hyperlink is SELECT_BTN. The column heading will be set to "My Column Title" and the hyperlink on the button will be set to the value of the DESCR field on same record.
Local Grid &grid;
Local GridColumn &hyperlinkColumn;
Local integer &i;
Local Rowset &rowset;
/* set the column header */
&grid = GetGrid(%Page, "MYRECORD");
&hyperlinkColumn = &grid.GetColumn("SELECT_BTN");
&hyperlinkColumn.Label = "My Column Title";
&rowset = GetLevel0()(1).GetRowset(Scroll.SOMERECORD);
/* Set the value for each hyperlink in the rowset */
For &i = 1 To &rowset.ActiveRowCount
&rowset(&i).SOMERECORD.SELECT_BTN.Label = &rowset(&i).SOMERECORD.DESCR.Value;
End-For;

Darryls99
- 921
- 6
- 11