Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8905959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:31:37+00:00 2026-06-15T02:31:37+00:00

I am using JQGrid v4.4.1 and MVC3. When Selecting the ‘Next Record’ or ‘Previous

  • 0

I am using JQGrid v4.4.1 and MVC3.

When Selecting the ‘Next Record’ or ‘Previous Record’ icon on The JQGrid Edit Form, I get a Microsoft JScript runtime error: Object doesn’t support property of method ‘split’.

If highlights a block of code in the jquery.jqgrid.min.js module : var j=g.split(“,”)

Sometimes intellesense says that g=0, other times it’s -2: I guess it’s data related, but i cannot see anything that could be causing this!
I’ve tried to include a section of this module, including this call, but I’m struggling to make head nor tailof it!

Can anyone help me in determining the cause of this error?

jquery.jqGrid.min.js Extract

2*k+"'>"+t.rowcontent+"</td></tr>"),a(h).append(r),r[0].rp=u);0===m.length&&(m=a("<tr "+q+" rowpos='"+u+"'></tr>").addClass("FormData").attr("id","tr_"+f),a(m).append(p),a(h).append(m),m[0].rp=u);a("td:eq("+(y-2)+")",m[0]).html("undefined"===typeof t.label?e.p.colNames[o]:t.label);a("td:eq("+(y-1)+")",m[0]).append(t.elmprefix).append(l).append(t.elmsuffix);n[j]=o;j++}});if(0<j&&(o=a("<tr class='FormData' style='display:none'><td class='CaptionTD'></td><td colspan='"+(2*k-1)+"' class='DataTD'><input class='FormElement' id='id_g' type='text' name='"+
e.p.id+"_id' value='"+d+"'/></td></tr>"),o[0].rp=j+999,a(h).append(o),c[b.p.id].checkOnSubmit||c[b.p.id].checkOnUpdate))c[b.p.id]._savedData[e.p.id+"_id"]=d;return n}function r(d,e,h){var f,k=0,g,m,j,q,l;if(c[b.p.id].checkOnSubmit||c[b.p.id].checkOnUpdate)c[b.p.id]._savedData={},c[b.p.id]._savedData[e.p.id+"_id"]=d;var o=e.p.colModel;if("_empty"==d)a(o).each(function(){f=this.name;j=a.extend({},this.editoptions||{});if((m=a("#"+a.jgrid.jqID(f),"#"+h))&&m.length&&null!==m[0])if(q="",j.defaultValue?
(q=a.isFunction(j.defaultValue)?j.defaultValue.call(b):j.defaultValue,"checkbox"==m[0].type?(l=q.toLowerCase(),0>l.search(/(false|0|no|off|undefined)/i)&&""!==l?(m[0].checked=!0,m[0].defaultChecked=!0,m[0].value=q):(m[0].checked=!1,m[0].defaultChecked=!1)):m.val(q)):"checkbox"==m[0].type?(m[0].checked=!1,m[0].defaultChecked=!1,q=a(m).attr("offval")):m[0].type&&"select"==m[0].type.substr(0,6)?m[0].selectedIndex=0:m.val(q),!0===c[b.p.id].checkOnSubmit||c[b.p.id].checkOnUpdate)c[b.p.id]._savedData[f]=
q}),a("#id_g","#"+h).val(d);else{var n=a(e).jqGrid("getInd",d,!0);n&&(a('td[role="gridcell"]',n).each(function(m){f=o[m].name;if("cb"!==f&&"subgrid"!==f&&"rn"!==f&&!0===o[m].editable){if(f==e.p.ExpandColumn&&!0===e.p.treeGrid)g=a(this).text();else try{g=a.unformat.call(e,a(this),{rowId:d,colModel:o[m]},m)}catch(i){g="textarea"==o[m].edittype?a(this).text():a(this).html()}b.p.autoencode&&(g=a.jgrid.htmlDecode(g));if(!0===c[b.p.id].checkOnSubmit||c[b.p.id].checkOnUpdate)c[b.p.id]._savedData[f]=g;f=
a.jgrid.jqID(f);switch(o[m].edittype){case "password":case "text":case "button":case "image":case "textarea":if("&nbsp;"==g||"&#160;"==g||1==g.length&&160==g.charCodeAt(0))g="";a("#"+f,"#"+h).val(g);break;case "select":var j=g.split(","),j=a.map(j,function(b){return a.trim(b)});a("#"+f+" option","#"+h).each(function(){this.selected=!o[m].editoptions.multiple&&(a.trim(g)==a.trim(a(this).text())||j[0]==a.trim(a(this).text())||j[0]==a.trim(a(this).val()))?!0:o[m].editoptions.multiple?-1<a.inArray(a.trim(a(this).text()),
j)||-1<a.inArray(a.trim(a(this).val()),j)?!0:!1:!1});break;case "checkbox":g+="";o[m].editoptions&&o[m].editoptions.value?o[m].editoptions.value.split(":")[0]==g?(a("#"+f,"#"+h)[b.p.useProp?"prop":"attr"]("checked",!0),a("#"+f,"#"+h)[b.p.useProp?"prop":"attr"]("defaultChecked",!0)):(a("#"+f,"#"+h)[b.p.useProp?"prop":"attr"]("checked",!1),a("#"+f,"#"+h)[b.p.useProp?"prop":"attr"]("defaultChecked",!1)):(g=g.toLowerCase(),0>g.search(/(false|0|no|off|undefined)/i)&&""!==g?(a("#"+f,"#"+h)[b.p.useProp?
"prop":"attr"]("checked",!0),a("#"+f,"#"+h)[b.p.useProp?"prop":"attr"]("defaultChecked",!0)):(a("#"+f,"#"+h)[b.p.useProp?"prop":"attr"]("checked",!1),a("#"+f,"#"+h)[b.p.useProp?"prop":"attr"]("defaultChecked",!1)));break;case "custom":try{if(o[m].editoptions&&a.isFunction(o[m].editoptions.custom_value))o[m].editoptions.custom_value.call(b,a("#"+f,"#"+h),"set",g);else throw"e1";}catch(q){"e1"==q?a.jgrid.info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+a.jgrid.edit.msg.nodefined,jQuery.jgrid.edit.bClose):
a.jgrid.info_dialog(jQuery.jgrid.errors.errcap,q.message,jQuery.jgrid.edit.bClose)}}k++}}),0<k&&a("#id_g",i).val(d))}}function u(){a.each(b.p.colModel,function(a,b){b.editoptions&&!0===b.editoptions.NullIfEmpty&&k.hasOwnProperty(b.name)&&""===k[b.name]&&(k[b.name]="null")})}function t(){var e,f=[!0,"",""],m={},g=b.p.prmNames,j,o,l,n,v,p=a(b).triggerHandler("jqGridAddEditBeforeCheckValues",[a("#"+h),z]);p&&"object"===typeof p&&(k=p);a.isFunction(c[b.p.id].beforeCheckValues)&&(p=c[b.p.id].beforeCheckValues.call(b,
k,a("#"+h),"_empty"==k[b.p.id+"_id"]?g.addoper:g.editoper))&&"object"===typeof p&&(k=p);for(l in k)if(k.hasOwnProperty(l)&&(f=a.jgrid.checkValues.call(b,k[l],l,b),!1===f[0]))break;u();f[0]&&(m=a(b).triggerHandler("jqGridAddEditClickSubmit",[c[b.p.id],k,z]),void 0===m&&a.isFunction(c[b.p.id].onclickSubmit)&&(m=c[b.p.id].onclickSubmit.call(b,c[b.p.id],k)||{}),f=a(b).triggerHandler("jqGridAddEditBeforeSubmit",[k,a("#"+h),z]),void 0===f&&(f=[!0,"",""]),f[0]&&a.isFunction(c[b.p.id].beforeSubmit)&&(f=c[b.p.id].beforeSubmit.call(b,
k,a("#"+h))));if(f[0]&&!c[b.p.id].processing){c[b.p.id].processing=!0;a("#sData",i+"_2").addClass("ui-state-active");o=g.oper;j=g.id;k[o]="_empty"==a.trim(k[b.p.id+"_id"])?g.addoper:g.editoper;k[o]!=g.addoper?k[j]=k[b.p.id+"_id"]:void 0===k[j]&&(k[j]=k[b.p.id+"_id"]);delete k[b.p.id+"_id"];k=a.extend(k,c[b.p.id].editData,m);if(!0===b.p.treeGrid)for(v in k[o]==g.addoper&&(n=a(b).jqGrid("getGridParam","selrow"),k["adjacency"==b.p.treeGridModel?b.p.treeReader.parent_id_field:"parent_id"]=n),b.p.treeReader)b.p.treeReader.hasOwnProperty(v)&&
(m=b.p.treeReader[v],k.hasOwnProperty(m)&&!(k[o]==g.addoper&&"parent_id_
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:31:38+00:00Added an answer on June 15, 2026 at 2:31 am

    After Oleg pointed me in the right direction (thanks Oleg!). I have managed to resolve this Error.

    Using The jquery.jqgrid.src.js (much more readable) I managed to take an educated guess that the problem lay on a column in my Grid that was using a FORMATTER. I then noticed that even when loading the Edit form – the value for this column was not correct – and bacause The edittype was ‘select’, it was defaulting to the first item in the value list.

    The Formatter would take the Value of the column (which could be either a -2, 0 or 1 in this case) and turn it into a gif for display purposes in the column. that worked lovely.

    The UnFormatter, however, attempted to turn the image back into it’s respective number (based on its title). I was then returning a numeric value ( ie. -2, 0 or 1). I needed to return a string value. (ie. ‘-2′,’0’ or ‘1’)

    So, it seems that for Unformatters, you cannot return numeric values like this.

    I have added the working code below for clarity 🙂

    Working formatters

    function EnabledFormatter(cellvalue, options, rowObject) {
        var cellValueInt = parseInt(cellvalue);
        switch (cellValueInt)
        {
            case 1:
                return "<img src='@Url.Content("~/Content/images/tick.gif")' title='Enabled' />";
                break;
            case -2:
                return "<img src='@Url.Content("~/Content/images/tick-grey.png")' title='Inherited' />";
                break;
            default:
                return "<img src='@Url.Content("~/Content/images/cross.gif")' title='Disabled' />";
                break;
        };
    };
    
    function EnabledUnformatter (cellvalue, options, cell) {
        var sTitle = $('img', cell).attr('title');
    
        switch (sTitle)
        {
            case 'Enabled':
                return '1';
                break;
            case 'Inherited':
                return '-2';
                break;
            default:
                return '0';
                break;
        };
    };
    

    Broken Unformatter Please note The lack of ” around the values returned. The EnabledFormatter is Unchanged

    function EnabledUnformatter (cellvalue, options, cell) {
        var sTitle = $('img', cell).attr('title');
    
        switch (sTitle)
        {
            case 'Enabled':
                return 1;
                break;
            case 'Inherited':
                return -2;
                break;
            default:
                return 0;
                break;
        };
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a simple mvc3 app using jqgrid. My form currently calls a function
I'm using jQGrid and I'm wondering if there is a way to get the
I am using JQGrid to get the date from the RESTFul web services that
I am using jqgrid on EF4 MVC3 (C#). I based search on this @Oleg
I am using jqgrid (standard) with EF 4 + MVC3 . I'd like to
I am using jqgrid (standard) with EF 4 + MVC3 . I'd like to
I am using jqgrid with local data and I know how to edit a
I have been using Trirand's jqGrid with ASP.NET MVC3 as well as the jquery.jqgrid
I'm using jqgrid's form editing feature. Can I programmatically set the readonly attribute of
Using jQGrid v4.2 and jQuery 1.8 I cant get search to work. When I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.