Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
I do not see the find and refresh buttons
05/11/2010
11:46
Avatar
renekreijveld
Best, Netherlands
Member
Members
Forum Posts: 7
Member Since:
05/11/2010
sp_UserOfflineSmall Offline

First of all, thansk for this awesome plugin, really brilliant!

Now, my question… When I look at the examples (http://www.trirand.com/blog/jq.....qgrid.html) and open the first example Loading data, XML data then I see at the bottom left a find and refresh icon.

Image Enlarger

I do not see that in my grid. I tried activating the navigator but that doesn't help.

Can anyone point me in the right direction how to add these?

05/11/2010
18:26
Avatar
driedger
New Member
Members
Forum Posts: 1
Member Since:
05/11/2010
sp_UserOfflineSmall Offline

I too am having problems getting any of the icons to load in the nav bar.

Using Jquery 1.4.3 and jqGrid 3.8.1.

xml data source, using xmlReader to map the fields correctly.

Tried searching forums, and found some examples of how to make it work, but nothing is loading for me regardless of what I try. I have tried loading navGrid via all 3 examples in the documentation (Javescript code, new api code, and chained mode)

.navGrid('#pager_controlsTasks',{ edit: true, add: true, del: true, search: true, refresh: true },

      {}//Options for Delete            

      {},//Options for the Add Dialog            

      {},//Options for the Edit Dialog

)

All Im really looking for is refresh, but cannot get any to load.

Help? Suggestions?

Thanks

11/11/2010
15:50
Avatar
renekreijveld
Best, Netherlands
Member
Members
Forum Posts: 7
Member Since:
05/11/2010
sp_UserOfflineSmall Offline

_Bump_

Anyone any suggestion for this? Please?

11/11/2010
17:49
Avatar
renekreijveld
Best, Netherlands
Member
Members
Forum Posts: 7
Member Since:
05/11/2010
sp_UserOfflineSmall Offline

Here is the HTML code:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My First Grid</title>
 
<link rel="stylesheet" type="text/css" media="screen" href="css/redmond/jquery-ui-1.8.6.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" />
<style>
html, body {
    margin: 1em;
    padding: 1em;
    font-size: 75%;
}
</style>
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-nl.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.min.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery().ready(function (){
$("#list1").jqGrid({
    url:'jsondump.php',
    datatype: 'json',
    colNames:['Id','Personeelsnummer','Positie', 'Datum','Gemeente'],
    colModel:[
        {name:'id', index:'id', width:50, search:false},
        {name:'persnr', index:'persnr', width:150 },
        {name:'positie', index:'positie', width:100, align:'right'},
        {name:'datum', index:'datum', width:100},
        {name:'gemeente', index:'gemeente', width:200}
    ],
       mtype: "POST",
    pager: '#gridpager',
    sortname: 'persnr',
    sortorder: 'asc',
    caption: 'Wachtlijst',
    autowidth: true,
    viewrecords: true,
    height: "100%"
  });
});
jQuery("#list1").jqGrid('navGrid','#gridpager',{edit:false,add:false,del:false});
</script>

</head>
<body>
    <table id="list1"></table>
    <div id="gridpager"></div>
</body>
</html>

Here is the PHP code of jsondump.php:

<?php
$page = $_REQUEST['page']; // get the requested page
$limit = $_REQUEST['rows']; // get how many rows we want to have into the grid
$sidx = $_REQUEST['sidx']; // get index row - i.e. user click to sort
$sord = $_REQUEST['sord']; // get the direction
if(!$sidx) $sidx = 1;

$totalrows = isset($_REQUEST['totalrows']) ? $_REQUEST['totalrows']: false;
if($totalrows) { $limit = $totalrows; }
$db = mysql_connect('localhost','root','root') or die("Connection Error: " . mysql_error());
mysql_select_db('excel') or die("Error conecting to db.");
$result = mysql_query("SELECT COUNT(*) AS count FROM xxxx_wachtlijst");
$row = mysql_fetch_array($result,MYSQL_ASSOC);
$count = $row['count'];
if( $count >0 ) {
    $total_pages = ceil($count/$limit);
}
else {
    $total_pages = 0;
}
if ($page > $total_pages) $page=$total_pages;
$start = $limit * $page - $limit; // do not put $limit*($page - 1)
$sql = "SELECT * FROM xxxx_wachtlijst ORDER BY $sidx $sord LIMIT $start , $limit";
$result = mysql_query( $sql ) or die("Could not execute query.".mysql_error());

$responce->page = $page;
$responce->total = $total_pages;
$responce->records = $count;
$i=0;
while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
    $responce->rows[$i]['id']=$row[id];
    $responce->rows[$i]['cell']=array($row[id],$row[persnr],$row[positie],$row[datum],$row[gemeente]);
    $i++;
}
echo json_encode($responce);

?>

11/11/2010
17:52
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Please open the jquery.jqGrid.min.js used and post the header info something like this:

/*

* jqGrid 3.8.1 - jQuery Grid

* Copyright (c) 2008, Tony Tomov, mailto:tony@trirand.com

* Date:2010-10-24

* Modules: grid.base.js;

.....;

*/

Regards
Tony

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.

11/11/2010
17:54
Avatar
renekreijveld
Best, Netherlands
Member
Members
Forum Posts: 7
Member Since:
05/11/2010
sp_UserOfflineSmall Offline

Here is the header info:

/*
* jqGrid  3.8.1 - jQuery Grid
* Copyright (c) 2008, Tony Tomov, mailto:tony@trirand.com
* http://www.gnu.org/licenses/gpl-2.0.html
* Date:2010-10-24
* Modules: grid.base.js; jquery.fmatter.js; grid.custom.js; grid.common.js; grid.formedit.js; jquery.searchFilter.js; grid.inlinedit.js; grid.celledit.js; jqModal.js; jqDnR.js; grid.subgrid.js; grid.grouping.js; grid.treegrid.js; grid.import.js; JsonXml.js; grid.setcolumns.js; grid.postext.js; grid.tbltogrid.js; grid.jqueryui.js;
*/

11/11/2010
17:57
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Is this in all browsers?

Try to add DOCTYPE declaration in the file

Tony

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.

11/11/2010
18:00
Avatar
renekreijveld
Best, Netherlands
Member
Members
Forum Posts: 7
Member Since:
05/11/2010
sp_UserOfflineSmall Offline

Sorry, DOCTYPE was in:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

I develop on Mac, tested in the following browsers:

FireFox 3.6.12

Chrome 5.0.375.70

Safari 5.0.2

11/11/2010
18:05
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Well - sorry that i do not look carfully into the code.

The problem is here:

<script type="text/javascript">
jQuery().ready(function (){
$("#list1″).jqGrid({

....
    viewrecords: true,
    height: "100%"
  });
});
jQuery("#list1″).jqGrid('navGrid','#gridpager',{edit:false,add:false,del:false});

</script>

Should be

<script type="text/javascript">
jQuery().ready(function (){
$("#list1″).jqGrid({

....
    viewrecords: true,
    height: "100%"
  });

jQuery("#list1″).jqGrid('navGrid','#gridpager',{edit:false,add:false,del:false});

});
</script>

Regards

Tony

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.

11/11/2010
18:08
Avatar
renekreijveld
Best, Netherlands
Member
Members
Forum Posts: 7
Member Since:
05/11/2010
sp_UserOfflineSmall Offline

I am really sorry, I now have this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My First Grid</title>
 
<link rel="stylesheet" type="text/css" media="screen" href="css/redmond/jquery-ui-1.8.6.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" />
<style>
html, body {
    margin: 1em;
    padding: 1em;
    font-size: 75%;
}
</style>
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-nl.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.min.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery().ready(function (){
$("#list1").jqGrid({
    url:'jsondump.php',
    datatype: 'json',
    colNames:['Id','Personeelsnummer','Positie', 'Datum','Gemeente'],
    colModel:[
        {name:'id', index:'id', width:50, search:false},
        {name:'persnr', index:'persnr', width:150 },
        {name:'positie', index:'positie', width:100, align:'right'},
        {name:'datum', index:'datum', width:100},
        {name:'gemeente', index:'gemeente', width:200}
    ],
       mtype: "POST",
    pager: '#gridpager',
    sortname: 'persnr',
    sortorder: 'asc',
    caption: 'Wachtlijst',
    autowidth: true,
    viewrecords: true,
    height: "100%"
  });
jQuery("#list1″).jqGrid('navGrid','#gridpager',{edit:false,add:false,del:false});
});
</script>

</head>
<body>
    <table id="list1"></table>
    <div id="gridpager"></div>
</body>
</html>

But now I have no grid at all...Cry

11/11/2010
18:13
Avatar
renekreijveld
Best, Netherlands
Member
Members
Forum Posts: 7
Member Since:
05/11/2010
sp_UserOfflineSmall Offline

Oops MY MISTAKE

I now see the grid! and I have search and refresh buttons.

When I try the search button I dialogue comes up. But the search doesn't return anything.

Don't I need to change the jsondump.php code so it can handle the search request? But how...?

25/11/2010
08:58
Avatar
Imtiyaz
New Member
Members
Forum Posts: 1
Member Since:
25/11/2010
sp_UserOfflineSmall Offline

I too having same problem...

My Code is as under.  I did tried all but to no success.  can tony/anyone help me out

<script type="text/javascript">
$(function(){
  $("#list").jqGrid({
    url:'viewTask.php',
    datatype: 'xml',
 
    colNames:['Task Name','Project Name', 'Assigned By','Assigned To','Phase','Task Created on'],
    colModel :[
      {name:'fld_name', index:'fld_name', width:90},
      {name:'fld_proj_id', index:'fld_proj_id', width:80},
      {name:'fld_assigned_by', index:'fld_assigned_by', width:80, align:'right'},
      {name:'fld_assigned_to', index:'fld_assigned_to', width:80, align:'right'},
      {name:'fld_phase', index:'fld_phase', width:55, align:'right'},
      {name:'fld_create_dt', index:'fld_create_dt', width:150, sortable:false}
    ],
    mtype: 'GET',
    pager: '#gridpager',
    rowNum:10,
    rowList:[10,20,30],
    sortname: 'fld_name',
    sortorder: 'desc',
    viewrecords: true,
    caption: 'My Task',
    height:"100%",
    width: 1024,
    });  

jQuery("#list").jqGrid('navGrid','#gridpager',{edit:false,add:false,del:false});

});
</script>
 
</head>
<body>
<table id="list"></table>
<div  id="gridpager"></div>

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
52 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information