Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1089251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:11:36+00:00 2026-05-16T23:11:36+00:00

I can see how to create a jqGrid link using: colModel: [ {name:’myname’, formatter:’showlink’,

  • 0

I can see how to create a jqGrid link using:

colModel: [ {name:'myname', 
             formatter:'showlink', 
             formatoptions:{baseLinkUrl:'someurl.php', addParam: '&action=edit'}

This creates a request like /someurl.php?id=XX&action=edit and the display text will be the value of myname.

But in our case we don’t need the myname text – our display text will be hard coded. We don’t want to have to pass any additional data down in our JSON request – but it seems you need a JSON attribute for each column. How can we have a link without the add’l JSON column?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T23:11:37+00:00Added an answer on May 16, 2026 at 11:11 pm

    The formatter 'showlink' like all other formatter are used to format the data loaded in jqGrid from server or from the local data. So in case of your example you will not have ‘myname’ text (the column name) in the link but the cell value from the grid.

    So if you want to use predefined formatter 'showlink' you have to fill the column data with the text which want to see in the link. You can do this either inside of your JSON data or filling/overwriting the text after the page are loaded for example inside of loadComplete event handle:

    loadComplete: function() {
        var grid = $("list");
        var ids = grid.getDataIDs();
        for (var i = 0, idCount = ids.length; i < idCount; i++) {
            grid.setCell(id, 'myname', 'My text for link');
        }
    }
    

    You can use also custom formatter and custom unformatter instead of 'showlink' predefined formatter. Then you can define the text of link like you want without filling any data in the grid.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create an arrow using CSS only Example you can see http://jsfiddle.net/b9Yfc/
How can I create a Popup balloon like you would see from Windows Messenger
We can see in a directory files ordered by Name in Windows Explorer. If
From an MSDN article on the subject, we can see that we create a
If I create a new WinForms application, I can see that that Form1 inherits
I created the setup project for the application and I can see that the
On Linux/NPTL , threads are created as some kind of process. I can see
I can see people asking all the time whether multiple inheritance should be included
I can see line numbers in my error logs in our development environment, in
I can see some options available: 1) Use PEAR's POP3 class --> tried it,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.