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
format link for url rewriting
03/12/2010
17:34
Avatar
joris_webamine
New Member
Members
Forum Posts: 1
Member Since:
03/12/2010
sp_UserOfflineSmall Offline

Hi all

I'd like to format a column cell as a link

I've already read this wiki page : http://www.trirand.com/jqgridw.....showaction

but there are only examples such as
http://localhost/someurl.php?m.....ction=edit

In my case, I use url-rewriting and I have to format links that look like :
http://localhost/someurl/123/edit

As I don't have an example that fits well, I tried somethings using jqGridRender::setColProperty()
but nothing works as expected.

Is there a way I can do that with jqGridRender (either server-side or client-side) ?

Thank you.

06/12/2010
00:41
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello Joris,

The predefined formatter showlink is not perfect. It is very easy to write your own custom formatter which produce exact HTML code fragment for the link format which you need.

In both cases the function which you can call in the way must be global. If you prefer concept of unobtrusive JavaScript you can use predefined formatter showlink with '#' as the value of href attribute and make binding to the click on the link inside of loadComplete function. I created small demo example which demonstrate the technique. On the click on the text like "Physics" in the table will be opened the url http://en.wikipedia.org/wiki/Physics which will be build dynamical. I included an additional alert to show how to decode information about the row id additionally.

Best regards
Oleg 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
29 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