Highlighted
Absent Member.
Absent Member.
1389 views

[archive] Couple of questions on GRID

[Migrated content. Thread originally posted on 07 February 2006]

I am using GRIDs in place of list boxes in many instances so that I can take advantage of the adjustable columns and the automatic headings etc.

Two issues I cannot get round are:

1. I cannot seem to generate the Ctrl-End action in the GRID. If I press Ctrl-End then it goes to the last line of the last page, but if I use ACTION = 11 it loads the last page but goes to the first line on that page. I want it to go automatically to the last line.

2. I cannot find any way to disable the cell box highlight which is annoying as I am only selecting a line, not a cell.

Any ideas?

Thanks
Keith
0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Couple of questions on GRID

1: You can inquire the last row of the grid and then set cursor-y to that value. IE
01 grid-last-row pic 9(??).

inquire my-grid last-row in grid-last-row.
if using column-headings
subtract 1 from grid-last-row
end-if
modify my-grid cursor-y = grid-last-row.

2: setting the grid option "cursor-frame-width" to 0 will turn off the dark border surrounding the selected cell. And if you set "cursor-color" to the same value as your selected row's "row-color" it will appear as though the entire row has been selected.


Hope this helps.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Couple of questions on GRID

Thanks for that - both work perfectly.
Regards
Keith
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Couple of questions on GRID

One last issue on GRID.

If a cell is protected, I cannot get the DBLCLICK event, the MSG-BEGIN-ENTRY event never arrives in the event procedure.

If it is unprotected then I get a really strange behaviour I do not seem to be able to stop. After the double click and in the MSG-BEGIN-ENTRY event capture I display the pop-up menu I want them to see. BUT if I then click on the cell that received the double click I go straight into edit mode on the cell WHICH I DO NOT WANT. If another different cell is clicked whilst the pop-up menu is shown then this behaviour does not happen and the menu just disappears.

I have tried to modify the cell as protected immediately before I display the pop-up menu but this has no effect.

Any Suggestions?

Regards
Keith
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Couple of questions on GRID

You can prevent the entry from occurring by setting EVENT-ACTION to EVENT-ACTION-FAIL inside the event begin-entry, this lock the cell to be entered, then you can call de pop-up and select a value what you want, then modify the cell-data.

*
Gd-Grid-Ev-Msg-Begin-Entry.

Set Event-Action to Event-Action-Fail
perform popup
.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Couple of questions on GRID

Again good advice - thanks - works OK.
Keith
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.