Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
cell value as hyperlink
14/05/2010
12:01
Avatar
aznan
Member
Members
Forum Posts: 32
Member Since:
14/01/2010
sp_UserOfflineSmall Offline

hello… there..  my problm is i cant create a hyperlink inside the cell.. I try few samples in the forum.. 

predefined formatter, or adding href tag to the data but the output is the same.. 

for example the value of my cell is http://www.hotmail.com.. but my link will return

"http://localhost/~aznanhjyusof/www.hotmail.com"

how can i set it so it will not include : "http://localhost/~aznanhjyusof/" 

I keep seeing people telling use custom formatter.. but unluckily.. i dunno hhow... i did look at some e.g. but I dunno how to set custom formatter for myself..

can anyone just show some basic code here on how to do thiss... a hyperlink to a website or document or pdf....

help.. I been trying to solve it for days…

15/05/2010
22:25
Avatar
DaElectric
Member
Members
Forum Posts: 16
Member Since:
15/05/2010
sp_UserOfflineSmall Offline

Dont mean to sound like an asshole but did you search the wiki? /jqgridwiki/doku.php?id=wiki:custom_formatter

When you define your collumn you will need to defin the formater for it.

jQuery("#grid_id").jqGrid({

   colModel : [
   ...
      {name:'myname', ... formatter:'MyLinkFormater', ...},
   ...
   ],

});

 Then you need to define a function called MyLinkFormater.  It will need to accept 3 parameters

 function MyLinkFormater (cellvalue, options, rowObject)
{
 
   return cellvalue.replace("http://localhost/~aznanhjyusof/", "");
}

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
51 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information