Note that there are some explanatory texts on larger screens.

plurals
  1. POjqgrid v4.4.4 - `{dataUrl:}` is ignored in Single/Advanced Search but correctly read in Search Toolbar/Form Edit. Bug or misconfiguration?
    primarykey
    data
    text
    <ul> <li>jquery: v1.9.1</li> <li>jqgrid: v4.4.4</li> </ul> <p>I had succesfully populated the dropdown list in <em>Search Toolbar</em> and <em>Form Edit</em> with data retrieved from the server via the property <code>dataUrl</code>, however the same expected list doesn't appear for the same column in <em>Advanced Search</em> form.</p> <p>Can anybody confirm this issue with <code>jqgrid</code> v4.4.4? Did I misconfigure <code>jqgrid</code>? Any suggestion would be helpful! :-)</p> <p>In the below code:</p> <ul> <li><code>searchoptions:{dataUrl:}</code> is ignored in <em>Single/Advanced Search</em></li> <li><code>searchoptions:{dataUrl:}</code> is correctly read in <em>Search Toolbar</em></li> <li><code>editoptions:{dataUrl:}</code> is correctly read in <em>Edit Form</em></li> </ul> <p>Here is the grid configuration:</p> <pre><code>jQuery.extend(jQuery.jgrid.search, {recreateForm: true}); $("#school").jqGrid({ height: 'auto', url: "lib/CSchoolAjax.php", datatype: "json", colNames: ['ID', 'Location'], colModel: [{ name: 'school_id', index: 'school_id', width: 30, fixed: true, align: "center", search:false, hidden: false },{ name: 'location', index: 'location', width: 80, align: "center", editable: true, edittype: 'select', editoptions: { dataUrl: "lib/CSchoolAjaxLocation.php", sopt: ['eq'] }, stype: "select", searchoptions: { dataUrl: "lib/CSchoolAjaxLocation.php", sopt: ['eq'] } } ], sortable: true, rowNum: 5, rowList: [5, 10, 20, 30, 40, 50], autowidth: true, rownumbers: true, pager: '#pager_school', sortname: 'school_id', viewrecords: true, sortorder: "desc", multiselect: false, caption: "Schools", editurl: 'lib/CSchoolAjax.php', hiddengrid:true, autoencode: true }) .navGrid('#pager_school', { edit: true, add: false, del: false, search:true },{ width: 'auto' },{},{},{ width: 'auto', multipleSearch:true, multipleGroup:false, //recreateForm: true, closeOnEscape: true },{ closeOnEscape:true }) .jqGrid('navButtonAdd', '#pager_school', { caption: "", title: "Select/Reorder Columns", buttonicon: "ui-icon-calculator", onClickButton: function () { $("#school").jqGrid('columnChooser'); } }) .jqGrid('navButtonAdd', "#pager_school", { caption: "Search", title: "Toggle Search Toolbar", buttonicon: 'ui-icon-search', onClickButton: function () { $("#school").filterToolbar({ searchOnEnter: false, stringResult: true, defaultSearch: 'cn' }); } }) .trigger('reloadGrid'); </code></pre> <p>The script "CSchoolAjaxLocation.php" returns</p> <pre><code>&lt;select&gt; &lt;option value=“1”&gt;Location One&lt;/option&gt; &lt;option value=“2”&gt;Location Two&lt;/option&gt; .. &lt;/select&gt; </code></pre>
    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.
 

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