Tuesday, 23 September 2014

Grid Column Label is displaying field value

Here is the situation 

Data is being fetched in a rowset and further being displayed in a grid on a Result Display Page. Now
three of the field values have hyperlinks which opens the relative page in a new window. For example the Column is Interview ID, Field Value = 00001. Everything is fine. But the Column Label is also displaying the value "00001" instead of "Interview ID".
If there are multiple rows: 00001, 00002, 00003,00004 & 00005, then the value of the first row is being displayed in the column label

Solution


Local Grid &myGrid;
Local GridColumn &myGridColumn, &myGridColumn1;
&myGrid = GetGrid(Page.PageName, "RecordName");
&myGridColumn1 = &myGrid.GetColumn("GridColumnName");

If (%Language = "ENG") Then
   &myGridColumn1.Label = "Interview ID";
End-If;

If (%Language = "ARA") Then
     &myGridColumn1.Label = "رقم المقابلة";
End-If;

2 comments:

  1. I've tried this logic for same scenario. It is not working.

    ReplyDelete
  2. I've tried this logic for same scenario. It is not working.

    ReplyDelete