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
dataURL & Selects
18/08/2009
12:09
Avatar
JSmith7040
New Member
Members
Forum Posts: 1
Member Since:
18/08/2009
sp_UserOfflineSmall Offline

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.

19/08/2009
06:20
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

Forum Timezone: Europe/Sofia

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

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information