Forum


11:52

02/10/2014

Hi there,
This plugin was awesome and it really work exactly on how I wanted to, however there are one problem that I've encountered for weeks, I've tried all kinds of "help" section provides, but still no luck in the end, hopefully I can get my answer directly by posting instead of viewing other people solution which is not relevant to my situation...Â
Â
var json_parsed = $.parseJSON(result)
jQuery("#jqgrid").jqGrid({ data : json_parsed, datatype : "local", height : 'auto', width : 'auto', ...
{ name : 'badge_name', index : 'badge_name', align : "center", editable: true, formatter: 'select', edittype: 'select', editoptions: { value: { '1': 'Yes', '0': 'No' }}},
Â
Is there any way that make the editoptions with both option_value:label_name based on array? Something likeÂ
{ name : 'badge_name', index : 'badge_name', align : "center", editable: true, formatter: 'select', edittype: 'select', editoptions: { value: { array_option_value: array_option_label_name}}},
Another question is that, even though if i managed to pull it off with array variable, what i can imagine from here is, will the option label name become like
<option value="1,2,3">array,label,name</option>
and what i expect was
<option value="1">array</option>
<option value="2">label</option>
<option value="3">name</option>
14:08

Moderators
30/10/2007

Hello,
Â
No such way,but note that the value option can be a function, which after called should return either a string or a object as described as the desired values.
Â
Kind 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:30

02/10/2014

So is it can be return in this way...??
      value : {<?php
      if(isset($_COOKIE['option_value']))
      {
      echo $result[0].":'\.$result1[0]\.',2:'two'";
      }
      ?>}}},
i may need some examples or samples to help me imagining as i'm still playing with the syntax around due to the " and 'Â
17:51

Moderators
30/10/2007

Hello,
Â
Not sure what you try to do. You mix PHP with JavaScript
This should be something like
Â
{
// do something here.
}
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:
22 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