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
stype="select" search field name is wrong
16/11/2009
22:54
Avatar
ssssssssssss
Member
Members
Forum Posts: 20
Member Since:
27/10/2009
sp_UserOfflineSmall Offline

grid.formedit.js

line:52

soptions = $.extend({},{text: colNames[i],value: v.index || v.name},this.searchoptions),

Should be:

soptions = $.extend({},this.searchoptions,{text: colNames[i],value: v.index || v.name}),

Because if the stype=="select" then searchoptions may contain the value atrribute.

And we will buildOption based on the fields.value which now is an object. That will make the search filter looks like this:

{"groupOp"%3A"AND"%2C"rules"%3A[{"field"%3A"[Object+Object]"%2C"op"%3A"eq"%2C"data"%3A"card"}]}

16/11/2009
23:20
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Aha, Thanks. Will be fixed.

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.

17/11/2009
00:51
Avatar
ssssssssssss
Member
Members
Forum Posts: 20
Member Since:
27/10/2009
sp_UserOfflineSmall Offline

I edited the src file, it seems work, but if I edit the minifyed js file directly, the options will display "undefined". Anything wrong?

When & where can I get the fixed release?

Thanks a lot!

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

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

Hello,

If you have ant istalled you can make a min file easy

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.

17/11/2009
01:05
Avatar
ssssssssssss
Member
Members
Forum Posts: 20
Member Since:
27/10/2009
sp_UserOfflineSmall Offline

Any docs about it here?

the minifyed file is not so hard to read, I found this one:

soptions=b.extend({},{text:v[w],value:j.index||j.name},this.searchoptions)

& change to:

soptions=b.extend({},this.searchoptions,{text:v[w],value:j.index||j.name})

then the options will not be displayed.

17/11/2009
13:14
Avatar
magic_pie4
New Member
Members
Forum Posts: 2
Member Since:
17/11/2009
sp_UserOfflineSmall Offline

I believe this is related due to the topic title, but I don't understand the solution.

I have a grid with a column setup as this:

{name:'merch_id',index:'merch_id',width:150, align:'center',editable: true, stype:'select', searchoptions:{value:"00000003:ABC Company;00000004:XYZ Company", sopt:['cn','nc']}, formatter:'select', edittype:"select", editoptions:{value: "00000003:ABC Company;00000004:XYZ Company"}},

When you bring up the search dialog, it displays the items correctly as a dropdown and you can select them, etc. Once you submit this however, it sends the following parms:
_search
true
nd
1258484858633
oper
getdata
page
1
rows
10
searchField
00000003:ABC Company;00000004:XYZ Company
searchOper
cn
searchString
00000004
sidx
list_name
sord
asc

Note the searchString is correct (from the one I selected), but the searchField should be populated with merch_id.

17/11/2009
19:51
Avatar
ssssssssssss
Member
Members
Forum Posts: 20
Member Since:
27/10/2009
sp_UserOfflineSmall Offline

I'm not so familiar with params you listed, so I guess you are not using the 3.6 release.

Actually, if you are using the version 3.6,you will notice a param called:filters. That's the key/value what we are talking about.

18/11/2009
07:18
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

@magic_pie4 - In case of single search that are the parameters. Please refer to docs in order to see the difference.

@ssss...s - I have made the changes in GitHub.

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.

18/11/2009
08:37
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

I've noticed similar problems with the definition of the value-attribute for stype:select in the search-/editoptions and my table search still does not work with the patch (of changing the order of the soptions-extend) mentioned above!

I solved the problem the following way, which in my option is not really a clean solution:

... stype: 'select', editoptions:{value:{'yes':'yes','no':'no'}}      // set the values for the select field via the editoptions attribute - and do not overwrite value of searchoptions

... // and change the order of the if-statement in grid.formedit.js (because soptions.value is inherited from somewhere with the column name (and is also required to be so, otherwise the problem of the field=[Object Object] occurs)

if(this.stype == 'select') {

...

    if(this.editoptions)
        eov = this.editoptions.value;
    else if(soptions.value)
        eov = soptions.value;*/

...

I would prefer a clean attribute naming which does not conflict with the column name stored in the value field.

Internally the select key-value pairs are stored in the soptions.dataValues array, so why not pass it in the column model either via the searchoptions or the editoptions as attribute "datavalues"???

Kind regard,

Klaus.

18/11/2009
08:39
Avatar
magic_pie4
New Member
Members
Forum Posts: 2
Member Since:
17/11/2009
sp_UserOfflineSmall Offline

I am doing a single search. The problem I'm having is when I use the

stype:'select', searchoptions:{value:”0003:ABC Company;0004:XYZCompany”} 

To generate a dropdown for the search, then the parm that it sends my data layer for

searchField is the string “0003:ABC Company;0004:XYZCompany” and not the name or index value of merch_id.

Basically, then my sql query tries to run this sql:

$sql = 'SELECT * from merchants WHERE 0003:ABC Company;0004:XYZCompany= “XYZCompany = 0003″

It is stuffing the wrong value for the searchField Parm in the post/get.

The information I provided earlier is from the firebug output.

Image Enlarger

If I am doing this incorrectly, any help would be appreciated. I basically just want
1) for select to send it's value as the search string, and
2) for the searchField to be the actual field, and not the list of values.

19/11/2009
04:22
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

@Klaus - Thanks for this and the recommendation. I will look on this right now.

@magic_pie4 - Thanks for this. Will test with your options and let you know about the result

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

19/11/2009
13:28
Avatar
blejzu
New Member
Members
Forum Posts: 1
Member Since:
19/11/2009
sp_UserOfflineSmall Offline

I'm not sure if it's related to this bug, but Advanced Search example in jqGrid demo is broken. After choosing "Tax" field you get undefined instead of tax values.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
82 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