Forum

July 12th, 2025
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
Formatter Not Firing At All
30/07/2009
14:56
Avatar
jkarlen
Member
Members
Forum Posts: 7
Member Since:
25/06/2009
sp_UserOfflineSmall Offline

I am using jqGrid 3.44 and I am unable to get the formatter functionality working at all.  I originally used a custom formatter but the function call I put in didn't appear to ever be firing so I dropped back to just try a checkbox out of the standard formatter list.  My column continues to display as plain data.   I have double checked my include configuraiton to be sure fmatter is being included.  Below is my jqGrid code:

$("#list2").jqGrid({
    url: ajax_url,
    mtype: 'POST',
    datatype: "json",
    colNames:['Order ID#', 'Segment', 'Units','ACK', 'Tier', 'Bill To', 'Ship To', 'Order Date', 'Due Date', 'CSS Class', 'Over Due'],
    colModel:[ {name:'order_id',index:'order_id', width:90, jsonmap: 'order_id'},
          {name:'order_segment',index:'order_segment', width:70, jsonmap: 'order_segment'},
          {name: 'units',index:'units',width:50},
          {name:'acknowledgement', index:'acknowledgement',width:50},
          {name:'tier',index:'tier', width:50, jsonmap: 'tier'},
           {name:'billing_name',index:'billing_name', width:180},
           {name:'shipping_name',width:180},
           {name:'order_date',width:100,editable:true,formatter:'checkbox'},
           {name:'due_date',index:'due_date',width:100,editable: true},
           {name:'css_class',hidden: true},
           {name:'overdue',hidden: true}
         ],
   jsonReader : {
    root: "rows",
    total: "totalpages",
    records: "records",
    page: "page",
    repeatitems: false,
    id: "order_number"
    },
    
   pager: $('#pager2'),
   rowNum:100,
   rowList:[10,20,30],
   imgpath: gridimgpath,
   sortname: 'due_date',
   viewrecords: true,
   sortorder: "desc",
   height: 600,
   caption:"Open Orders",
   afterInsertRow: function(rowid, aData){
           if(aData.css_class != 'none')
           {
            for(cell = 0; cell < 9; cell++)
            {
             $("#list2").setCell(rowid, cell, '', aData.css_class);
            }
           }
           if(aData.overdue)
           {
            $("#list2").setCell(rowid, 'due_date', '', 'overdue');
           }
          },
   ondblClickRow: function( rowid ) {
           jumpToOrderID( rowid );
     } }).navGrid("#pager2", {edit: true, add: false, del: false});

04/08/2009
02:02
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

What values do you have in the data for this field, maybe you will need to use the editoptions to set what you expect to be for the checkbox.

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: 994

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