Grid View with mouseover features?

In Grid View,

When we point to the pencil icon, after a few second, the message ‘Edit this row’ appeared.

My question is, I have a field named modeofpayment which only keep the single character code, the code is ‘M’ for Monthly, ‘S’ for Semi-Annual, ‘Q’ for Quarterly & ‘A’ for Annually.

Now, in Grid View -> Grid Lookup, I added this syntax,
SELECT description
FROM modeofpayment
WHERE modeofpayment = ‘{modeofpayment}’
ORDER BY description
& the display result is correct.

My question is, how to show the {modeofpayment} when I mouseover the MODE OF PAYMENT field (something like the pencil icon features)?

Regards,
CK Kong

Re: Grid View with mouseover features?

The edit icon is a link. If you are wanting to create a mouseouver for a field, it will also need to have a link for the field. A basic field is just html text on the screen.

You can create alink in LINK, or in code using sc_link() in the onRecord event. You can point to link to nowhere if you just want a link and not have to go somewhere.

Regards,
Scott.

Re: Grid View with mouseover features?

Dear Scott.,

Can you please show an example for this?

Regards,
CK Kong

Re: Grid View with mouseover features?

grid/events/onRecord:

sc_link(field_to_link, , , “My Hint”, “”);

The only problem with this approach is that it wants to send you somewhere. If you want to display additional information on another page (app), then you are ok. Then you will have:

sc_link(field_to_link, my_info_display_app.php, , “My Hint”, “”);

where my_info_display_app will display detailed information about the hint.

I am not aware of any other approach unless you use a form/editable grid view which supports Javascript where you could code something there. It would be nice of the regular grid suppported JS to possibly allow for this.

Regards,
Scott.

Re: Grid View with mouseover features?

You can always use # as an empty link target. This is a link to the same page to an anchor which does not exist. This will not reload the page and it is valid HTML.

Regards
Arno

Re: Grid View with mouseover features?

On paper, that sounds good, but SC5 still tries to build a URL that will send you somewhere.

sc_link(phone, “#”, , “My Hint”, “”);

I will have to report this as a bug.

Regards,
Scott.