Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The reason why you have so strange sorting oder is that in the way how you use jqGrid currently you create the grid having one column with <strong>string</strong> data. The string data will be:</p> <pre><code>"\n &lt;a href=\"http://www.jsmith.com/4093\"&gt;Hello&lt;/a&gt;\n " "\n &lt;a href=\"http://www.jsmith.com/4094\"&gt;Bob&lt;/a&gt;\n " "\n &lt;a href=\"http://www.jsmith.com/4093\"&gt;Loblaws&lt;/a&gt;\n " "\n &lt;a href=\"http://www.jsmith.com/4093\"&gt;Wahoo&lt;/a&gt;\n " </code></pre> <p>How you can see the string which contain "Bob" substring has "4094" before. So the string will be the last string in the sort order.</p> <p>You can improve the situation using the second <code>options</code> parameter of <code>tableToGrid</code>, but the best way would be to make clear <strong>separation of the information</strong> about the text displayed in the column (like "Bob", "Hello") and so on from the url data. Then the sorting on the columns will be exactly like you want. So it is better don't use <code>tableToGrid</code> function for your data and create jqGrid in the direct way.</p> <p>Because I don't know from which source you get the information about the url for the texts it is difficult to give you some recommendation for the best implementation. You can find examples how to construct links in the jqGrid <a href="https://stackoverflow.com/questions/5010761/linking-from-a-column-value-in-jqgrid-to-a-new-page-using-get/5017528#5017528">here</a> and <a href="https://stackoverflow.com/questions/4390999/jqgrid-showlink/4391786#4391786">here</a>. I think that you can easy modify the examples for your purpose.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload