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
Showlink does not work
14/01/2010
12:54
Avatar
jogep
Germany
Member
Members
Forum Posts: 23
Member Since:
14/01/2010
sp_UserOfflineSmall Offline

Hello,

I try to format a Column as Link. I try it with different Options but it never renders a Link for me.

employeenumber = {};

employeenumber.name = "salesemployee.employeenumber";

employeenumber.jsonmap = "salesemployee.employeenumber";

employeenumber.index = "salesemployee.employeenumber";

employeenumber.formatter = "showlink";

employeenumber.formatoptions = { baseLinkUrl : '', showAction : '/jquery-grid/grid.action', addParam : '&action=show', target : '_new' };

employeenumber.editable = false;

gridloadtable_colnames.push("Employee");

gridloadtable_colmodels.push(employeenumber);

Does anyone have an suggestion?

Johannes

14/01/2010
21:35
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello 

replave the values of baseLinkUrl and showAction

Good reading of docs sometimes help 

http://www.trirand.com/jqgridw.....nk_example

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

15/01/2010
17:34
Avatar
jogep
Germany
Member
Members
Forum Posts: 23
Member Since:
14/01/2010
sp_UserOfflineSmall Offline

I try it like your suggestion with this

formatoptions = { baseLinkUrl : '/jquery-grid/grid.action', target : '_new' };

But without Success. Are there any prerequistes for showlink formatter?

I have read your Example, why there is set the formatter to "select"instead of "showlink" in the Wiki?

19/01/2010
11:24
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

I'm not sure what you do, but there is a demo with such example and it works ok.

What does not work actually?

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

20/01/2010
10:29
Avatar
jogep
Germany
Member
Members
Forum Posts: 23
Member Since:
14/01/2010
sp_UserOfflineSmall Offline

It does not render a link. When i use a custom formatter I can render a Link,

also when I use the link formatter.

But when I use the showlink formatter I got only a cell with value but it is not

rendered as Link.

I try it with various combinations of formatoptions but no way.

Are there any dependencies to use this formatter?

Thanks for your help

Johannes

22/01/2010
14:16
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Could you please dump the colModel after the grid is created, and see what you have for this column

comething like (using FireBug)

console.log( $("#mygrid").getGridParam('colModel') );

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

22/01/2010
15:12
Avatar
jogep
Germany
Member
Members
Forum Posts: 23
Member Since:
14/01/2010
sp_UserOfflineSmall Offline
22/01/2010
15:40
Avatar
jogep
Germany
Member
Members
Forum Posts: 23
Member Since:
14/01/2010
sp_UserOfflineSmall Offline
24/01/2010
18:30
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Everthing seem to be OK, so I think that something is not loaded. The formatter does not depend on any other module

When you have the grid please check at the top which modules do you have.

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

24/01/2010
21:37
Avatar
jogep
Germany
Member
Members
Forum Posts: 23
Member Since:
14/01/2010
sp_UserOfflineSmall Offline

Other Formatters like Link, Date, Integer working. Is showlink in an differnt modul?

Best Regards

Johannes Geppert

25/01/2010
10:29
Avatar
newperson
Member
Members
Forum Posts: 27
Member Since:
28/12/2009
sp_UserOfflineSmall Offline

Hey I saw this post so the idea came to me that I could use this on my grid to point to interesting data.

Everything was going good until I wanted to use data inside my cells.

My question is: I want to use data inside my cell to put on the link, is the showlink restricted to id fields only, it seems to be hard coded and there isn't an option to specify anything regarding posting cell values. Would I need a custom formatter to do this?

I was able to get the basic example to work but it's using the id not other cell values

-> http://ubuntu/openaudit/system.....ew=summary

{name:'computer',index:'system_uuid', width:85, formatter:'showlink', formatoptions:{baseLinkUrl:'http://ubuntu/openaudit/system.....p', addParam: '&view=summary', idName:'pc'}},
 

Now I have service tags that I'd like to link to the dell website, however these service tags aren't id's they are cell values.

I was not able to get this to work it returns

->http://support.dell.com/suppor.....4257200001

*SW4257200001 is data retrieved using json and this is the id field which I don't need

 {name:'svctag',index:'system_id_number', width:60, align:"center", formatter:'showlink', formatoptions:{baseLinkUrl:'http://support.dell.com/suppor.....s', idName:'c=us&l=en&s=biz&cs=usbsdt1&servicetag'}},

system_id_number is:

$responce->rows[$i]['cell']=array($row[system_uuid],$row[system_model],$row[system_id_number],$row[system_os_name]);

Thanks and hope this makes sense.

26/01/2010
17:41
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello

@Johannes

The only thing if I see the code is - if your value a string. We make this checking for show link

        if(isString(cellval)) {    //add this one even if its blank string
            return "<a "+target+" href="" + idUrl + "">" + cellval + "</a>";
        }else {
            return $.fn.fmatter.defaultFormat(cellval,opts);
        }

@newperson

You can at write your own custom formatter if the provided does not meet your needs.

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

05/02/2010
18:49
Avatar
meenakship
US
New Member
Members
Forum Posts: 1
Member Since:
25/11/2009
sp_UserOfflineSmall Offline

I am using formatter: 'showlink' option to display cell as link.

It works fine as ling as the cell value is string. If the cell value is number, it does not show link.

I used the console.log( $("#mygrid").getGridParam('colModel') ); option and it is displaying all parameters correctly.

Any idea?

Thanks

10/02/2010
15:29
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

The code above tell you why!

if(isString(cellval))

....

Will fix it.

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

30/03/2010
20:37
Avatar
iknowkungfoo
New Member
Members
Forum Posts: 1
Member Since:
30/03/2010
sp_UserOfflineSmall Offline

tony said:

Hello,

The code above tell you why!

if(isString(cellval))

....

Will fix it.

Best Regards

Tony


Tony, has this fix been rolled into any downloadable file?

03/04/2010
14:53
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Fixed. Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

10/05/2010
17:59
Avatar
bobstamp
New Member
Members
Forum Posts: 1
Member Since:
10/05/2010
sp_UserOfflineSmall Offline

I'm having a similar problem where with 'showlink' not working correctly. 

Here is my SQL statement:

SELECT  Cast(t1.ProposalID as varchar) as proposalid,  t1.proposalno, t1.proposalsur

….

The proposalid is an int field, but as far as I can tell … it should be returned as a varchar.  

The data does display correctly in the grid, but not as a link.

If i change the SQL statement to be:

SELECT 'a' + Cast(t1.ProposalID as varchar) as proposalid,  t1.proposalno, t1.proposalsur

….

then the link appears and works as expected.  (However the link does not work because of the added 'a')

I have, what I believe is the latest version downloaded …. jquery.jqGrid-3.6.5

Any help would be appreciated.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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