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 5962985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:10:59+00:00 2026-05-22T19:10:59+00:00

I am trying to use the edit delete functions in jqgrid. I can’t seem

  • 0

I am trying to use the edit delete functions in jqgrid.

I can’t seem to get it to pass the record id to my processing page
the edit is sending all values, but the delete only sends the jqgridrow id (id=jqg16).
Obviously I need the record id so I know which record to delete!
The record id column is id_mdt;
my column that holds the record id is set up as follows:

myGrid = jQuery("#rowed2").jqGrid({ 
    url:'data/stokistdata_s_json.php?q=3', 
    datatype: "json",
    mtype: "POST", 
    rowNum:10, 
    rowList:[50,100,150,200,300,400,500,600], 
    pager: '#prowed2', 
    sortname: 'name_mdt', 
    viewrecords: true, 
    gridview:true,
    sortorder: "asc", 
    rowNum:50, 
    scroll: true, 
    editurl: "data/server.php", 
    caption:"Stockist's and Orchid days",
    colNames:[
        'Actions',
        'id', //record id column
        'Type', 
        'Name', 
        'Geo Address',
        'Display Address',
        'Telephone',
        'Email', 
        'website', 
        'lat', 
        'lng', 
        'flag', 
        'description', 
        'active'
    ], 
    colModel:[{
        name:'Actions',
        index:'Actions',
        width:100,
        sortable:false,
        search:false
    }, {//record id column
        name:'id_mdt',
        index:'id_mdt',
        width:15,
        align:"left",
        sortable:true,
        search:false,
        hidden: true, 
        editable: true, 
        editrules: { edithidden: false }, 
        hidedlg: true           
    }, {
        name:'id_etp',
        index:'id_etp', 
        width:90, 
        align:"left",
        sortable:true,
        editable:true,
        edittype:"select",
        formatter:'select',
        editoptions:{value:":All;1:Stockist;2:Orchid Day"},
        search:true,
        stype:'select',
        sopt: ['eq'],
        searchoptions:{value:":All;1:Stockist;2:Orchid Day"}
    }, {
        name:'Name_mdt',
        index:'Name_mdt',
        align:"left", 
        width:150,
        editable:true,
        search:true,
        stype:'text',
        sopt:['cn']
    }, {
        name:'geoaddr_mdt',
        index:'geoaddr_mdt',
        width:150, 
        align:"left",
        editable:true,
        search:false,
        edittype:"textarea", 
        editoptions:{rows:"3",cols:"30"}
    }, {
        name:'displayaddr_mdt',
        index:'displayaddr_mdt', 
        width:150, 
        align:"left",
        editable:true,
        search:false,
        edittype:"textarea", 
        editoptions:{rows:"3",cols:"30"}
    }, {
        name:'telephone_mdt',
        index:'telephone_mdt', 
        width:80,
        align:"left",
        editable:true,
        search:false
    }, {
        name:'email_mdt',
        index:'email_mdt', 
        width:80, 
        align:"left",
        sortable:false,
        editable:true,
        search:false
    }, {
        name:'website_mdt',
        index:'website_mdt', 
        width:80, 
        align:"left",
        sortable:false,
        editable:true,
        search:false
    }, {
        name:'lat_mdt',
        index:'lat_mdt', 
        width:40, 
        align:"left",
        sortable:false,
        editable:true,
        search:false
    } , {
        name:'lng_mdt',
        index:'lng_mdt', 
        width:40, 
        align:"left",
        sortable:false,
        editable:true,
        search:false
    }, {
        name:'flag_mdt',
        index:'flag_mdt', 
        width:20, 
        align:"left",
        sortable:true,
        editable:true,
        edittype:"select",
        editoptions: {value:{'1':'Flagged','0':'No Flag'}},
        search:true,//
        stype:'select',
        searchoptions:{value:{'':'All','1':'Flagged','0':'No Flag'}}//{value:":Both;1:Flagged;0:No Flag"}
    }, {
        name:'description_mdt',
        index:'description_mdt', 
        width:150, 
        align:"left",
        sortable:false,
        editable:true,
        search:false,
        edittype:"textarea", 
        editoptions:{rows:"3",cols:"30"}
    }, {
        name:'active_mdt',
        index:'active_mdt', 
        width:20, 
        align:"left",
        sortable:true,
        editable:true,
        edittype:"select",
        editoptions: {value:{'1':'Active','0':'Hidden'}},
        search:true,//
        stype:'select',
        searchoptions:{value:{'':'All','1':'Active','0':'Hidden'}} //{value:":Both;1:Active;0:Hidden"}
    }], search : {
         caption: "Search...",
         Find: "Find",
         Reset: "Reset",
         matchText: " match",
         rulesText: " rules"
   },

    gridComplete: function(){ 
        var ids = jQuery("#rowed2").jqGrid('getDataIDs'); 
        for(var i=0;i < ids.length;i++){ 
            var cl = ids[i]; 
            be = "<input style='height:22px;width:20px;' type='button' value='E' alt='Edit Location' onclick=\"jQuery('#rowed2').editGridRow('"+cl+"');\" />"; 
            se = "<input style='height:22px;width:20px;' type='button' value='S' onclick=\"jQuery('#rowed2').saveRow('"+cl+"');\" />"; 
            ce = "<input style='height:22px;width:20px;' type='button' value='C' onclick=\"jQuery('#rowed2').restoreRow('"+cl+"');\" />";
            fl = "<input style='height:22px;width:50px;' type='button' value='Find' alt='Find Location' class='findMe' rel='"+cl+"' />";
            gc = "<input style='height:22px;width:50px;' type='button' value='Geo' class='geocodeMe' rel='"+cl+"' />";
            jQuery("#rowed2").jqGrid('setRowData',ids[i],{Actions:fl+gc}); 
        } 
    }
}); 

jQuery("#rowed2").jqGrid('navGrid',"#prowed2",
    {edit:true,add:true,del:true,search:true,refresh:true},
    {closeOnEscape:true, recreateForm: true, width:500},
    {closeOnEscape:true, recreateForm: true, width:500}    // Add options

); 
myGrid.jqGrid('filterToolbar',{defaultSearch:'cn',stringResult:true});
});
  • 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-05-22T19:11:00+00:00Added an answer on May 22, 2026 at 7:11 pm

    try adding key: true in your colModel for the id field.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write the following spec using Specs2 but can't seem to get
When I use PHPMyAdmin to edit or delete a record I am getting an
I'm trying to use SQL Server Management Studio to edit database tables. But I
OKay I don't use actionscript and trying to help my friend edit a flash
i'm trying use facebook API to upload photo in my fan page. I downloaded
I was trying use a set of filter functions to run the appropriate routine,
I'm trying use self-signed certificate (c#): X509Certificate2 cert = new X509Certificate2( Server.MapPath(~/App_Data/myhost.pfx), pass); on
I'm trying to use a UITableView with some cells having the 'delete' option which
I am trying to use handle database with insert, update, and delete such as
I'm trying to use the dynamic script tag for cross-domain ajax, since I can't

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.