Nevermind.. I realized the demo shows the posts, and obviously it's just me again! 
Thanks!
tim
np 
So look at your SQL statements:
$result = mysql_query(“SELECT COUNT(*) AS count FROM jqgrid”);
$SQL = “SELECT * FROM jqgrid ORDER BY $sidx $sord LIMIT $start , $limit”;
and compare that to the jqGrid example:
$result = mysql_query(“SELECT COUNT(*) AS count FROM invheader a, clients b WHERE a.client_id=b.client_id”);
Yours has no WHERE clause.
You can see the arguments you need to check for:
$row[id],$row[title],$row[director],$row[year],$row[bond],$row[budget]
and you know how to check for them…
$id= $_GET[“id”];
I'm not a php guy so I am not going to start debugging/suggesting your code, but you need to handle the arguments passed into your php script and incorporate them into your SQL statement.
tim
np.
> does the search need to be built into one these files?
The jqGrid plugin automatically applies the search parameters to your 'new.php',
I'll do my best, but I don't think I fully understand you.
> What i am failing to see is if both the display and the search is handled by in my case new.php then how are these filters reacting with the db?
The first post made for your grid to request data is on load and has the following argument:
_search
Your original url:'new.php' handles both the
This post showed a method to accomplish what I think you're asking about:
http://www.trirand.com/blog/?p…..ertoolbar/
It's not pretty since the initial re-load/flicker is apparent.
I think there should be better ways to do this (i.e. store the default query parameters on the server, then use a global variable (on the client) to indicate the first load was completed, append the indicator as a post parameter to pass to the server indicating that further query requests can superceed the original defaults. The problem here becomes what does an 'empty' value mean on subsequent posts? That the user deleted a filter value and wants to un-filter a field? or that they deleted it wanting to get back to the default? It gets kinda messy, but can be done.)
Better: Maybe Tony can add some feature that handles this the other way (passing init vals that get handled by jqGrid on only the initial data load, but also have a method to attach to a button that can reset defaults? something like this). I think it's gonna be a common thing for people to want. I just don't know how important this will be to him.
I plan to look at this someday too so hopefully a clean solution comes about.
tim
I think you can use 'prmNames' for this (it's a grid level config setting)
Check the docs, see if it will work for you.
tim
Your load order is all wrong.
Curious, why are you're loading these separately?
Why are you not including them in the min file build?
If you need to separate them then follow the load order as set in the load file (jquery.jqGrid.js) as found in source from github.
Yours are kinda backwards.
tim
opps – my example link had an error later last night, when I pushed some code out. fixed.
It's better if you post your grid config file. Its' too difficult to suggest anything when I can't see the code.
tim
[edit: here's an example I have that works : http://blackstag.com/jqDemo/demo.jqGrid.PAGE0.html ]
This is a PHP to SQL issue, not a jqGrid issue.
From what I can see, not understanding anything about PHP, your
case 'invid':
is not being applied to the varialbe $wh
To troubleshoot this put your debugger on and look at the output for $wh inside your
switch ($examp) {
To answer the first question, I am not sure about custom formatter, but you could do this:
afterInsertRow: function(rowid, aData){
1. I use jquery 1.4.2 and jqGrid 3.6.5. with no problems.
2. The order of the data coming back doesn't matter.
The only thing I see wrong with you code is the extra comma at the end of this line:
{name:'label', label:'Label', width:90},
I don't see anything wrong with your json.
Sometimes I get the same hanging, but normally it's because I made some change to some js that creates an error (like an 'undefined' variable somewhere).
tim
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top