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_TopicIcon
editoptions in jqgrid
21/11/2008
06:53
Avatar
paapie
Member
Members
Forum Posts: 15
Member Since:
18/11/2008
sp_UserOfflineSmall Offline

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

21/11/2008
08:50
Avatar
YamilBracho
Member
Members
Forum Posts: 124
Member Since:
08/09/2008
sp_UserOfflineSmall Offline

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
22/11/2008
03:53
Avatar
paapie
Member
Members
Forum Posts: 15
Member Since:
18/11/2008
sp_UserOfflineSmall Offline

2) I know that I have to use server side code to create a value but how?

This won't work:

editoptions:{value:”:<? $select ="select * from table";

$query = mysql_query($select);

while($list=mysql_fetch_assoc($query)){

echo''.$list['blaat'].'';

}

”}

How to make it work?

24/11/2008
00:43
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

25/11/2008
11:52
Avatar
paapie
Member
Members
Forum Posts: 15
Member Since:
18/11/2008
sp_UserOfflineSmall Offline

Where can I find the php functions

for jqgrid searching for days can't find

a good example?

I know php well but it wont work sorry being noobish

25/11/2008
15:25
Avatar
paapie
Member
Members
Forum Posts: 15
Member Since:
18/11/2008
sp_UserOfflineSmall Offline

This won't work :

     {

name:'tax',

index:'tax',

width:80,

align:”right”,

edittype:'select',

editable:true,

editoptions:{value:”:All;<?=$row[tax]?>”}

}, 

Please give me a good example many people

asking for it on the web!

A love the plugin but it won't work my way Wink

26/11/2008
01:48
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

26/11/2008
05:58
Avatar
paapie
Member
Members
Forum Posts: 15
Member Since:
18/11/2008
sp_UserOfflineSmall Offline

Everytime I get the error "undefined" or no

result (blank). The result is from search.php.

echo $row[tax]; doesnt work again

no result.

please give me a good example .

I want a dynamical selectbox that

get values from the database.

Thanks for helping tony

27/11/2008
03:09
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

27/11/2008
07:36
Avatar
paapie
Member
Members
Forum Posts: 15
Member Since:
18/11/2008
sp_UserOfflineSmall Offline

I know how php works!

But I dont know how to integrate it

in your plugin.

I get the error undefined every time

27/11/2008
12:00
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

02/12/2008
07:10
Avatar
paapie
Member
Members
Forum Posts: 15
Member Since:
18/11/2008
sp_UserOfflineSmall Offline

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!

02/12/2008
07:28
Avatar
paapie
Member
Members
Forum Posts: 15
Member Since:
18/11/2008
sp_UserOfflineSmall Offline

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.

06/02/2009
09:04
Avatar
jracine
Member
Members
Forum Posts: 6
Member Since:
06/02/2009
sp_UserOfflineSmall Offline

pappie, the link you provided above seems to be broken. Can you post an updated, working link? I'm interested in seeing you code. I need to do this same thing in a JSP, but would like to see how you got it working with php.

thanks.

Forum Timezone: Europe/Sofia

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.com

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information