The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Datagrid Hyperlink column
Posted: 02 Aug 06 5:49 AM
|
fiogf49gjkf0d Hello,
Anyone know how the datagrid hyperlink columns work ?
I just want to make an hyperlink column in my datagrid which refer to an Internet address. How can I define the link ? which property to use ?
Thanks Before,
Ichai
|
|
|
|
Re: Datagrid Hyperlink column
Posted: 02 Aug 06 11:06 AM
|
fiogf49gjkf0d You would simply choose Hyperlink as the column type (or if creating the grid at runtime add a column of type 11). There is an event on the grid to respond to clicks of hyperlink clicks (forget what it is called, but the name is obvious, something like OnHyperlinkColumnClick). In that event you do whatever you want where it be launching a form, running a script, launching a URL or whatever.
Make sense? |
|
|
|
Re: Datagrid Hyperlink column
Posted: 01 Nov 06 3:14 PM
|
fiogf49gjkf0d Hi. This is my first post here. I'm a beginner SLX Dev/Admin. Got a problem.
I have a DataGrid with column type Hyperlink, which contains links to a web sites.
I am trying to catch the DatagridHyperlinkStart(Sender, PrimaryKeyValue, FieldName, Value, ByRef LaunchBrowser) event, but for some reason, when I click on the link, this event does not fire.
Oh, and while I'm here, is there a reference about SLX controls somewhere? Would be really helpfull, like properties and methonds for different controls.
Thanks in advance. |
|
|
|
Re: Datagrid Hyperlink column
Posted: 01 Nov 06 3:20 PM
|
fiogf49gjkf0d Make sure the event is wired up. Look at the Events tab behind the properties view when the grid is selected in Architect. Look for the HyperlinkStart event and either select your event for it or double-click the event and it will create the stub for you.
As far as references on controls, there is this site, the SLX help files (which don't go into any real deep detail about the controls themselves), or Stephen Redmond's book DevLogix (see link on home page of this site). The advice I always give is to use an object browser (like the one built into the VS IDE) and start spelunking. That's the best way IMO to learn about the controls. |
|
|
|
Re: Datagrid Hyperlink column
Posted: 01 Nov 06 3:47 PM
|
fiogf49gjkf0d Originally posted by Ryan Farley
Make sure the event is wired up. Look at the Events tab behind the properties view when the grid is selected in Architect. Look for the HyperlinkStart event and either select your event for it or double-click the event and it will create the stub for you.
|
|
Did exactly that:
Sub dtgLinksHyperlinkStart(Sender, PrimaryKeyValue, FieldName, Value, ByRef LaunchBrowser) STOP End Sub
STOP should fire the VS debugger, and it does not. I assume for some reason it does not fire up, despite me clicking the hyperlink. Is that something SAGE support might advice on? I'm on version 7.0 BTW. |
|
|
| |
|
Re: Datagrid Hyperlink column
Posted: 01 Nov 06 4:31 PM
|
fiogf49gjkf0d If you have 1 to many links then a grid is a good choice. Maybe the debugger isn't firing because you've not set the options to launch debugger on error (look in options for the user you're logging in as). If you put a MsgBox in the stub I suppose that doesn't show as well? |
|
|
|
Re: Datagrid Hyperlink column
Posted: 01 Nov 06 4:34 PM
|
fiogf49gjkf0d Nope. Nothing happens. Not MsgxBox not anything else.
I've set the client to debug on error, and it fires debugger every time STOP occurs.
|
|
|
|
Re: Datagrid Hyperlink column
Posted: 02 Nov 06 10:37 AM
|
fiogf49gjkf0d Hate to say this, but it does work for me. I've not specifically tested this in v7, but I have customs that use this in v6x, so unless they broke something.
I'd have to say it sounds like the event is either not firing (which the only logical cause would be the column type in use doesn't trigger that event) or it is firing and just not being received (which would have to mean that the event handler is not properly wired up) |
|
|
|
Re: Datagrid Hyperlink column
Posted: 07 Nov 06 2:07 PM
|
fiogf49gjkf0d Ryan, could you please post a piece of working code for an OnHyperLinkStart event, just so I'll get the general idea. Maybe the problem is I'm not using this event correctly?
Thanks |
|
|
|
Re: Datagrid Hyperlink column
Posted: 13 Nov 06 9:41 AM
|
fiogf49gjkf0d Ok, It took SAGE 1.5 weeks to give me a resolution. I am posting it here, in case somene else has the same problem.
Apparently, if you check the "Disable Editor" checkbox in the column properties, it disables the Hyperlink Launch functionality. I'm still trying to figure out if it's a "Undocumented Feature". Correct me if I'm wrong, but doesn't "Disable Editor" usually means that user cannot edit value of the field? |
|
|
|
Re: Datagrid Hyperlink column
Posted: 13 Nov 06 2:16 PM
|
fiogf49gjkf0d I guess the problem is the hyperlink portion is considered "editing" when symantically speaking it isn't.
Do you need to disable the editor? Can a user type information into the field and change the URL? If they can, then Disable Editor is necessary and should be divorced from the hyperlink.goto process. There's a way to trap editing manually through OnEdited events but it's a pain to implement. If the user can't change the contents then Disable Editor isn't necessary but one of a long list of those "things to remember" that come with the territory of working with SalesLogix. |
|
|
|
Re: Datagrid Hyperlink column
Posted: 23 Jan 07 6:37 AM
|
fiogf49gjkf0d Hi,
I've to say that I've the same problem. I can't find a modus where the hyperlinkstart event will be thrown. I disabled any readable/Editor Properties and other events which I use in this grid nothing helped. We use SLX 6.2. Has someone an Idea what to do?
Joern |
|
|
|
Re: Datagrid Hyperlink column
Posted: 21 Feb 07 5:41 PM
|
fiogf49gjkf0d Hello all,
I just encounter the same issue with SLX v7 SP1. However, I found that the datagrid's Row Select property seems to be blocking the on HyperLinkStart event from triggering, as well as the column’s Disable Editor property. Try turning them both off. |
|
|
|
Re: Datagrid Hyperlink column
Posted: 23 Feb 07 2:34 AM
|
fiogf49gjkf0d Ahh thanks a lot! I tested it with SLX 6.2 and when Rowselect and Disable Editor are not selected then the Hyperlinkevent will be thrown. Anyway because of the fact that in this case the Datagrid is editable it's not usable :o(.
Jörn |
|
|
|
Re: Datagrid Hyperlink column
Posted: 23 Feb 07 9:31 AM
|
fiogf49gjkf0d Actually, that’s not true. Set your hyperlink column’s properties to “Read-Only” True and “Disable Editor” False. Then set your standard column’s properties to “Read-Only” True and “Disable Editor” True. What this will do is cause the entire cell to highlight in both standard and hyperlink columns and prevent them from being edited. Although, you do lose the nice pretty effect of a full row select, but you can make it work. |
|
|
|
Re: Datagrid Hyperlink column
Posted: 27 Feb 07 1:24 PM
|
fiogf49gjkf0d That actually works quite well, I'm so grateful this forum exists otherwise I'd never have found the right combination to make the event trigger. For the record, if you're using the OnEditing event of the grid make sure to return true for that field otherwise it won't launch the event either. |
|
|
|