fgl_grid_header()

You can dynamically alter the grid headings using the fgl_grid_header() function. This function will apply changes to the named grid in the current form only. fgl_grid_header() can also be used to change the alignment of the header text and also to dynamically change the key associated with a mouse click on a particular header.

 

This function takes between three and five parameters – grid_name, field_name, label, alignment and keyname. It is used to change the label associated with the grid and field passed to it and either or both of its alignment and keypress. This keypress is the action that occurs when the grid header is clicked on.

The optional alignment parameter can be one of ‘left’, ‘right’ or ‘center’.

The optional key_name parameter can be any valid 4GL key.         

This is an example of dynamically changing a grid column header.

CALL fgl_grid_header("sc_grid","f1","A new header label")

 

The next example shows the dynamic changing of a grid column header, its alignment and also the key press that occurs when the column header is clicked on. In this case clicking on the column header would generate a F32 key. A 4GL programmer could use this key press to perform an operation on the data, for example a sort on that particular column.

CALL fgl_grid_header("sc_grid","f1","This is my label","left", "F32")

 

These settings will apply to a grid in the current form only. If you do not specify the keypress, any existing keypress associated with the column will be cleared.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.