Forum


12:09

18/08/2009

I want to say I have researched the forum extensively and although I have seen helpful information on how to deal with creating a "Select" using the DataURL declaration I am having no luck. I keep getting an empty select in both the Add & Edit form.
I am using V3.5
My ColModel is:
$('#filter').jqm();
var selectedRow = 0;
$("#list").jqGrid(
{
url:'speciesType.cfc?method=getSpeciesType', //CFC that will return the users
datatype: 'json', //We specify that the datatype we will be using will be JSON
colNames:['ID','Species Type','SpeciesID','OwnerID','UserID'], //Column Names
/*
The Column Model to define the data. Note you can make columns non sortable, specify width, alignment, etc.
We also specify the editoptions, edittype=text shows a nice textbox for inline edit.
We have also specified Edit Rules, to say which fields are required/not required for add/edit
*/
colModel :[
{name:'typeID',index:'typeID', width:50,resizable:false, sorttype:"int",resizable:false,editrules:{readonly:true}},
{name:'typeDesc',index:'typeDesc', width:250,resizable:false, sorttype:"text",editable:true,edittype:"text",editoptions:{size:30,maxlength:50},editrules:{required:true}},
{name:'speciesId',index:'speciesId', width:50, editable:true, edittype:'select', editoptions:{dataUrl:'selectlist.cfm', defaultValue:'1'}},
{name:'ownerId',index:'ownerId', width:75,resizable:false, align:"left",sorttype:"int",editable:true,edittype:"text",editoptions:{size:30,maxlength:50},editrules:{required:true}},
{name:'userId',index:'userId', width:75,resizable:false, align:"left",sorttype:"int",editable:true,edittype:"text",editoptions:{size:30,maxlength:50},editrules:{required:true}}
],
My 'selectlist.cfm' is :
<select name="list">
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
Any insight into what I am doing incorrectly would greatly be appreciated.
Jeffrey S.
06:20

Moderators
30/10/2007

Hello,
Could you please check in FireBug what you get from dataUrl response - i.e. what is the status of the request with this url selectlist.cfm
after you open the form or edit the row or cell.
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:
131 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