Skip to main content

[archive] Highlighting Grid Row

  • November 20, 2006
  • 3 replies
  • 0 views

[Migrated content. Thread originally posted on 20 November 2006]

Hello!
Is there any way to highlight a grid row when you click on it by changing the color of the text in that row?

Thanks!!!!:confused:

3 replies

[Migrated content. Thread originally posted on 20 November 2006]

Hello!
Is there any way to highlight a grid row when you click on it by changing the color of the text in that row?

Thanks!!!!:confused:
If you look at the gridctl sample program provided by Acucorp, it'll let you see how its done.

Shaun

[Migrated content. Thread originally posted on 20 November 2006]

Hello!
Is there any way to highlight a grid row when you click on it by changing the color of the text in that row?

Thanks!!!!:confused:
Is there any way to do it by clicking any field in a row rather than just the row header?

[Migrated content. Thread originally posted on 20 November 2006]

Hello!
Is there any way to highlight a grid row when you click on it by changing the color of the text in that row?

Thanks!!!!:confused:
In the grid events (Msg-Begin-Drag, Msg-Goto-Cell, Msg-Goto-Cell-Mouse, Msg-Goto-Cell-Drag and Msg-Begin-Entry), add code like this:-
           MODIFY Your-Grid-Control-Name,
               Y = EVENT-DATA-2,
               ROW-COLOR BRIGHT-WHITE BCKGRND-RED.
Assuming that Event-Data-2 holds the row number that your user clicked on, which it will for the events mentioned.

Once you've highlighted the row that the user has clicked on, you need to remove highlights from the line they just left. I do it all in one step like this:-
           MODIFY Ss02-Gd-Docket-Lines,
               Y = WS01-DOCKET-LINE 1,
               ROW-COLOR BLACK BCKGRND-BRIGHT-WHITE
               Y = EVENT-DATA-2,
               ROW-COLOR BRIGHT-WHITE BCKGRND-RED,
               CURSOR-Y = EVENT-DATA-2.


Ian