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_Related Related Topics sp_TopicIcon
editformbutton & local data in jqGrid 4.4.0
21/08/2012
02:46
Avatar
cguest
Australia
New Member
Members
Forum Posts: 1
Member Since:
21/08/2012
sp_UserOfflineSmall Offline

Below is my attempt at a jqGrid 4.4.0 form with local data and  Edit & Delete buttons on each row.

I am using the editformbutton option in the formatnoptions.

I am importing the following modules:
    
    jquery.js
    jquery-ui-1.8/jquery-ui-1.8.9.custom.min.js
    jquery-ui-1.8/jquery-ui-timepicker-addon.0.9.3.js
    jquery-validate/jquery.validate.min.js
    date.format.1.2.3.js
    jquery.jqGrid-4.4.0/css/ui.jqgrid.css
    jquery.jqGrid-4.4.0/js/i18n/grid.locale-en.js
    jquery.jqGrid-4.4.0/js/jquery.jqGrid.src.js
    jquery.jqGrid-4.4.0/src/jqModal.js
    jquery.jqGrid-4.4.0/src/jqDnR.js
    json2.js

I am currently getting a JavaScript error like this when I hit the 'Submit' button on the Edit form.

    Error: TypeError: $.type is not a function
    Source File: http://localhost/jquery.jqGrid.....rid.src.js
    Line: 52

I'm still unclear as to what is minimally required for the local data to be updated when I hit the 'submit' button in the form.

    var mytabledata = [
        {id:1, qty:3, item:'xyz', price:10.0},
        {id:2, qty:2,item:'abc', price:12.0}
    ];

    $("#mytable").jqGrid({
        datatype: 'local',
        data: mytabledata,
        editRow: true,
        editurl: 'clientarray',
        fixed:true,
        colNames:['', '', '', '', '', ''],
        colModel:[
            {name:'id',index:'id', width:20, sortable:false, align:'right', hidden:true},
            {name:'actedit',index:'actedit',width:20,align:'left',sortable:false,formatter:'actions',
                     formatoptions:{
                         editformbutton: true,
                         delbutton : false,
                         keys: false
                     }
            },

            {name:'qty',index:'qty', width:20, sortable:false, editable:true, edittype:'select', editoptions:{value:"1:1;2:2;3:3"} },
            {name:'item',index:'item', width:50, sortable:false, editable:true},
            {name:'price',index:'price', width:20, sortable:false, align:'right'},
            {name:'actdel',index:'actdel',width:20,align:'left',sortable:false,formatter:'actions',
                     formatoptions:{
                         editbutton : false,
                         delbutton : true,
                         keys: false
                   }
            }
        ],
        width:280,
        sortname: 'id',
        viewrecords: true,
        sortorder: "desc",
        height: 'auto'
        }
        ).navGrid(
                "#sc-pager",{edit:false,add:false,del:false}
        );

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
24 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