Forum
23:59
20/10/2009
when in colModel edittype set to 'select' and dataUrl points to external php script, in grid it shows all cells as 'undefined', but when I try to Add or Edit – it fills dropdown correctly in the form. When I just link to 3.5.2 version – it works, but when I use 3.5.3 – it does'nt. And response JSON arrays from external script (dataUrl) filled also correctly in both versions. Any idea?
02:55
Moderators
30/10/2007
Hello,
Your post does not help. We need a test case, link to the problem or the code with the data.
Reagrds
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.
04:09
20/10/2009
colModel section (dataType in jqGrid.options set to JSON)
{
name:'id_tag',
index:'id_tag',
edittype:'select',
editoptions:{
dataUrl:'./lib/php/do.list.php?table=bak_tags'
},
formatter:'select'
}
raw GET response when open form for adding or editing
<select>
<option value='1'>Acronis</option>
<option value='2'>APbackup</option>
</select>
load data response. In grid, in column for 'id_tag' must be 'Acronis', but there 'undefined'. All other columns showed correctly
02:36
Moderators
30/10/2007
Hello,
All work as expected. Just to analize the situation:
1. You set a edit type select - in this case we expect the data for the select to be get when we perform editiing via the dataUrl option.
2. In the same way you use the formatter select. These values should be in the grid options before you populate the data to the grid. The simple question is why? Just to think - in the case provided from you use another request to obtain the data - in the same time the grid uses his own request to populate the data, which request will be done first? - it is unknown. I think you understand this point. In order to work this you should
...
{ name: 'some', edittype:'select', formatter:'select', editoptions : {dataUrl:'the_url', value:{"1:one;2:two..."} }
The editoption value is for the formatter select while the dataUrl is for the editing.
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.
06:00
20/10/2009
Thanks for answer – now it works! But I was confused – if there was error in colModel definition – why it works with 3.5.2 – while *ALL* other project files (html,js,php,mySQL db) are the same? And the second one: it's not comfortable (IMHO) to use param 'value' explicitly defined in colModel if I use external URL for dropdown values. May it be optionally allowed preloading these values when init grid: i.e, ajaxSetup: async->false, load data according to editUr(if 'value' parameter is not defined) and fill 'value' parameter, ajaxSetup: async->true, continue init grid
06:45
20/10/2009
And one more important thing (be patient, plz): edyttype=select works fine, BUT
- reload page
- select any row in grid and click [Edit] - edit form popup
- fields with edittype=select filled with values but they don't match values in this record - they always select 1st item in listbox
- close form and open again - on the same record - values selected correctly.
this situation reproduced all the time. in editOptions recreateForm = false
09:14
Moderators
30/10/2007
Hello,
The bug is fixed in 3.6beta.
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:
50 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