Solved

How to display hyperlink columns on listview

  • 1 September 2020
  • 3 replies
  • 249 views

Hi,

 

In the smartbox, there is a hyperlink property. The corresponding listview is editable and user can input a website url/link into that field , for ex :- user can input https://www.google.com/ in that field. This value does not get saved in the smartbox hence does not get displayed in the listview when list is loaded again.
As per my understanding and reading from other articles - the hyperlink has to be in xml string format of -  <hyperlink><link>https://www.google.com/</link><display>Click Link</display></hyperlink>. 
But I am trying to save the link in this format, but still it does not get saved in the smartbox and does not display in the listview.
What is the error here and what is the right way to edit/update hyperlink property and display on the listview?
Thanks

icon

Best answer by Prineel 1 September 2020, 13:37

View original

3 replies

Hi,


 


You can add hyperlinks from an item view and it will display in your list view as a hyperlink:
https://help.k2.com/onlinehelp/K2Five/UserGuide/5.3/default.htm#Create/K2Designer/Controls/Hyperlink/HyperlinkControl.htm


I could not add links directly from a list view nor edit the one i added from the item view either, but I will try to do some more digging and get back to you if I find anything useful.


 


Kind Regards


Prineel

Hi,


 


I think i found a solution, so both your smartobject field and your listview field needs to be set to the "hyperlink" type ( see hyperlink1.png). In the text field you need to have a value for it to display in the list view, it can be any value i just used the word "test" (see hyperlink1 again). I did put the exisiting  "url"  pattern, but i dont think that is relevent. Attached is an image (hyperlink2.png) of what it looks like in the list view. You can add and edit directly from the listview.


Hope this helps :)


 


Kind Regards


Prineel


 


K2 will not accept any liability for any issues arising from actions taken in respect of information provided by any forum member.


 

Hi  @Prineel ,

 

Thanks a lot for quick help on this one. The issue was in my listview, add/edit item I wasn't using the hyperlink control before, it was by default a textbox. Now I changed it to hyperlink control and voila !! It works .

Thanks
Shikha

Reply