Forum


06:53

18/11/2008

Dear trirandblog,
I have two questions about the editoptions in grid.
1.) I want to make the search bar static so you don't have to click on search.
2.) With editoptions in the searchbar I want to make dropdowns with automatic database response. How to make it that way? Now I use static numbers like :
editoptions:{value:":All;0.00:0.00;12:12.00;20:20.00;40:40.00;60:60.00;120:120.00"}
change it to:
editoptions:{value:":(database)"}
Like this way, is there any option?
Sorry for my bad english!
Many regards,
paapie
08:50

08/09/2008

1) Not sure if I understand what you mean but If you mean have not search option put this option in false in the "standard" parameter of the Navigation bar.
jQuery("#grid_id").navGrid('#Pager',{
edit:false,add:false,del:false,search:false
....
2) Using server side code creates a response as the value in the editoptions
00:43

Moderators
30/10/2007

Hello,
Refere to PHP functions how to convert SQL query result to
the string that is acceptable in jqGrid.
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.
01:48

Moderators
30/10/2007

Hello,
Try to echo the result and see what you have. See what you
output with this PHP code is compatible with the options.
Also if you make pure PHP
echo $row[tax];
What you have?
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.
03:09

Moderators
30/10/2007

Hello,
php.net is a good start. Also check how to work with mysql functions
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.
12:00

Moderators
30/10/2007

Hello,
I suggest first to try with simple data not generated from PHP.
The example is from demo site:
colModel:[
{name:'id',index:'id', width:90, sorttype:"int", editable: true}, {name:'name',index:'name', width:150,editable: true,editoptions:{size:"20",maxlength:"30"}}, {name:'stock',index:'stock', width:60, editable: true,edittype:"checkbox",editoptions: {value:"Yes:No"}}, {name:'ship',index:'ship', width:90, editable: true,edittype:"select",editoptions:{value:"FE:FedEx;IN:InTime;TN:TNT;AR:ARAMEX"}}, {name:'note',index:'note', width:200, sortable:false,editable: true,edittype:"textarea", editoptions:{rows:"2",cols:"10"}}
]
You should care that the last item should not contain ; at end - i.e
this is wrong
editoptions:{value:"FE:FedEx;IN:InTime;TN:TNT;AR:ARAMEX;"}
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.
07:10

18/11/2008

Tony I have a strange error with the database.
My records are visable but when I call a function
like this in my page:
<? include("dbconfig.php");
$select = "select * from invheader";
$query = mysql_query($select) or die (mysql_error());
$list = mysql_fetch_assoc($query);
?>
I get :
"No database selected"
But is I delete this:
<?
$select = "select * from invheader";
$query = mysql_query($select) or die (mysql_error());
$list = mysql_fetch_assoc($query);
?>
It works again, very strange!
07:28

18/11/2008

I have solved it!
I have made a dbconfig.php on the page
itself!
Now I have a dynamical dropdownlist.
But now I want to show my grid without
jqgrid.html but nothing displays.
check:
http://www.egmondonline.furion.....l/demo.php
view the source code.
Most Users Ever Online: 715
Currently Online:
34 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