Forum
01:25
05/09/2014
I have tried quite a few navbar combinations, and I cannot get the search icon to appear. The grid is loading, paging working, etc...
This is my current code configuration, server code not include obviously... (I do not have some of the template specific code and such configured yet, I will put that in once I can get the icon to appear...  )
Â
 <link rel="stylesheet" type="text/css" href="/Includes/jqgrid/themes/smooth/jquery-ui.css">    <link rel="stylesheet" type="text/css" href="/Includes/jqgrid/themes/ui.jqgrid.css">    <script type="text/javascript" src="/Includes/jqgrid/js/jquery-1.11.0.min.js"></script>    <script type="text/javascript" src="/Includes/jqgrid/js/grid.locale-en.js"></script>    <script type="text/javascript" src="/Includes/jqgrid/js/jquery.jqGrid.min.js"></script>      <script type="text/javascript">
    Â
 jQuery(document).ready(function()
      { jQuery("#grid").jqGrid({
            url: "getinfo.php",
            datatype: "json",
            mtype: 'POST',
            autowidth: true,
            height: 330,
            colNames: ["Name", "Num", "Field", "Pad", "API", "Legal", "County, State",
               "Lease", "Unit CA PA", "Status", "Updated", "Wildlife Stips", "Notes"],
            colModel: [
               { name: "well_name", width: 48,sortable: true, search:true},
               { name: "well_num", width: 18,sortable: true},
               { name: "field", width: 48,sortable: true, search:true},
               ...
            ],
            rowNum:10,
            rowList:[10,25,50,10000],
            pager : '#gridpager',
            sortname: 'field',
            viewrecords: true,
            rownumbers: true,
            gridview: true,
            sortorder: "asc",
            caption:"Master Well List Maintenance"
         });
      });
   jQuery("#grid").jqGrid('navGrid','#gridpager',
   {
      edit:false,
      add:false,
      del:false
   },
   {},
   {},
   {},
   {
      multipleSearch:true,
      multipleGroup:true,
      showQuery: true,
      // set the names of the template
      "tmplNames" : ["Template One", "Template Two"],
      // set the template contents
      "tmplFilters": [template1, template2]
   });
Â
   Â
<section class="grid">Â Â Â Â Â Â Â Â Â Â Â Â Â <table id="grid"></table> Â Â Â Â Â Â Â Â Â <div id="gridpager"></div> Â Â Â Â Â Â Â Â Â <script type="text/javascript"> Â Â Â Â </section>
22:22
05/09/2014
Fixed, FINALLY! I had to locate the nav bar inside of the closing }); as noted below...
  Â
jQuery(document).ready(function()       { jQuery("#grid").jqGrid({             url: "getinfo.php",             datatype: "json",             mtype: 'POST',             autowidth: true,             height: 330,             colNames: ["Name", "Num", "Field", "Pad", "API", "Legal", "County, State",                "Lease", "Unit CA PA", "Status", "Updated", "Wildlife Stips", "Notes"],             colModel: [                { name: "well_name", width: 48,sortable: true, search:true},                { name: "well_num", width: 18,sortable: true},                { name: "field", width: 48,sortable: true, search:true},                ...             ],             rowNum:10,             rowList:[10,25,50,10000],             pager : '#pager',             sortname: 'field',             viewrecords: true,             rownumbers: true,             gridview: true,             sortorder: "asc",             caption:"Master Well List Maintenance"          });          jQuery("#grid").jqGrid('navGrid','#pager',          {             view: true,             del: false,             add: true,             edit: true,             search: true,             refresh: true          },          { /*prmEdit*/ },          { /*prmAdd*/ },          { /*prmDel*/ } ,          {             /*prmSearch*/             multipleSearch:true          },          { /*prmView*/ }          );       });
Â
14:01
Moderators
30/10/2007
Hello,
Â
Thnks for the feedback and solution. This is a mistake which often occur.
Â
Regards
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.
Most Users Ever Online: 715
Currently Online:
42 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66