Forum
22:54
27/10/2009
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"}]}
23:20
Moderators
30/10/2007
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.
00:52
Moderators
30/10/2007
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.
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 truend 1258484858633oper getdatapage 1rows 10searchField 00000003:ABC Company;00000004:XYZ Company
searchOper cnsearchString 00000004sidx list_namesord asc
Note the searchString is correct (from the one I selected), but the searchField should be populated with merch_id.
07:18
Moderators
30/10/2007
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.
08:37
18/11/2009
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.
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.
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.
04:22
Moderators
30/10/2007
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.
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66