Client Events
tab
3. Add new OnShowItem
Method
4. Add the following code
var path = this.getProperty("link_path"); // <- use name of property that stores the hyperlink
window.open(path, '_blank');
This solution overrides the custom form, so it´s only sufficient when you really just store some simple hyperlinks in the relationship grid. Some other options for the Relationship grid would be a custom Action or to create a separate ItemType for hyperlinks (better look&feel).
If there is a solution for a "real" hyperlink properties in grids available, I would be highly interested in it!Hi Angelap,
I believe this should be viewed as 2 separate questions:
1) How do I add an on-click event to follow a URI/URL?
This depends on where you want the link to appear, but essentially you can use the OnClick of the Grid, or OnLoad of the form as you mentioned..
2) How do I style a string field to look like a link?
This can be achieved by adding css to the Item (assuming you are using a property called myproperty) you could set the default value for css to
.myproperty{
color: #0000AA; /* Change this with links color*/
cursor: pointer;
text-decoration: underline;
};
Many thanks,
Martin
Hi Angelap,
I believe this should be viewed as 2 separate questions:
1) How do I add an on-click event to follow a URI/URL?
This depends on where you want the link to appear, but essentially you can use the OnClick of the Grid, or OnLoad of the form as you mentioned..
2) How do I style a string field to look like a link?
This can be achieved by adding css to the Item (assuming you are using a property called myproperty) you could set the default value for css to
.myproperty{
color: #0000AA; /* Change this with links color*/
cursor: pointer;
text-decoration: underline;
};
Many thanks,
Martin
Hi Martin
As you explained on styling the Property of a Itemtype, I couldnt achive the same, can you explain me in better way.
Like I added your styling code in the "Default Value" column of the Property, but still no changes occured, or the value did not look like hyperlink in the grid.
Thanks,
Yoga
Hi Yogalakshmi,
Did you find any solution for the same issue?
Thanks,
Tejaswini