Forum


12:01

14/01/2010

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…
22:25

15/05/2010

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.
…
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/", "");
}
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66