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

  • SEARCH
  • Home
  • 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 am trying to create 100 files using FileOutputStream/BufferedOutputStream. I can see the CPU
I am using Netbeans 6.8. I can see an option to create a web
I want to create an arrow using CSS only Example you can see http://jsfiddle.net/b9Yfc/
I need to create a component such as progressbar (as you can see in
When I create new Listcell( a) I can only see output as a instead
From an MSDN article on the subject, we can see that we create a
I am attempting to create a page where a user can see what their
I want to create a bidding system where user can see the current price
I would like to create a ComboBox like you can see in the following
I'm using jqgrid 4.1.2, a sample of the code used to create the grid

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.