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

  • Home
  • SEARCH
  • 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 6180503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:51:14+00:00 2026-05-24T00:51:14+00:00

jqGrid parameter loadonce: true is used Selecting rows and pressing delete button No url

  • 0

jqGrid parameter loadonce: true is used

Selecting rows and pressing delete button

No url is set

How to delete rows in local data only and suppress this error message ?
Is it possbile to set some dummy url or any other idea to allow row delete?
It would be nice if add and edit forms can be used also with local data.

            url: 'GetData',
            datatype: "json",
            multiselect: true,
            multiboxonly: true, 
            scrollingRows : true,
            autoencode: true,
            loadonce: true, 
            prmNames:  {id:"_rowid", oper: "_oper" }, 
            rowTotal: 999999999,
            rownumbers: true,
            rowNum: 999999999,

Update 1

From Oleg answer I understood the following solution:

  1. Disable jqGrid standard delete button
  2. Add new delete button to toolbar.
  3. From this button click event call provided

    grid.jqGrid(‘delGridRow’, rowid, myDelOptions);

method.
Multiple rows can selected. How to delete all selected rows, this sample deletes only one ?

Is’nt it better to change jqGrid so that delete, edit, add buttons work without url ? Currently it is required to pass dummy url which returns success always for local data editing.

  • 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-24T00:51:15+00:00Added an answer on May 24, 2026 at 12:51 am

    You can use delRowData method do delete any local row.

    You can do use delGridRow from the form editing if you need it. I described the way here and used for formatter:’actions’ (see here, here and originally here).

    var grid = $("#list"),
        myDelOptions = {
            // because I use "local" data I don't want to send the changes
            // to the server so I use "processing:true" setting and delete
            // the row manually in onclickSubmit
            onclickSubmit: function(options, rowid) {
                var grid_id = $.jgrid.jqID(grid[0].id),
                    grid_p = grid[0].p,
                    newPage = grid_p.page;
    
                // reset the value of processing option which could be modified
                options.processing = true;
    
                // delete the row
                grid.delRowData(rowid);
                $.jgrid.hideModal("#delmod"+grid_id,
                                  {gb:"#gbox_"+grid_id,
                                  jqm:options.jqModal,onClose:options.onClose});
    
                if (grid_p.lastpage > 1) {// on the multipage grid reload the grid
                    if (grid_p.reccount === 0 && newPage === grid_p.lastpage) {
                        // if after deliting there are no rows on the current page
                        // which is the last page of the grid
                        newPage--; // go to the previous page
                    }
                    // reload grid to make the row from the next page visable.
                    grid.trigger("reloadGrid", [{page:newPage}]);
                }
    
                return true;
            },
            processing:true
        };
    

    and then use

    grid.jqGrid('delGridRow', rowid, myDelOptions);
    

    UPDATED: In case of multiselect: true the myDelOptions can be modified to the following:

    var grid = $("#list"),
        myDelOptions = {
            // because I use "local" data I don't want to send the changes
            // to the server so I use "processing:true" setting and delete
            // the row manually in onclickSubmit
            onclickSubmit: function(options) {
                var grid_id = $.jgrid.jqID(grid[0].id),
                    grid_p = grid[0].p,
                    newPage = grid_p.page,
                    rowids = grid_p.multiselect? grid_p.selarrrow: [grid_p.selrow];
    
                // reset the value of processing option which could be modified
                options.processing = true;
    
                // delete the row
                $.each(rowids,function(){
                    grid.delRowData(this);
                });
                $.jgrid.hideModal("#delmod"+grid_id,
                                  {gb:"#gbox_"+grid_id,
                                  jqm:options.jqModal,onClose:options.onClose});
    
                if (grid_p.lastpage > 1) {// on the multipage grid reload the grid
                    if (grid_p.reccount === 0 && newPage === grid_p.lastpage) {
                        // if after deliting there are no rows on the current page
                        // which is the last page of the grid
                        newPage--; // go to the previous page
                    }
                    // reload grid to make the row from the next page visable.
                    grid.trigger("reloadGrid", [{page:newPage}]);
                }
    
                return true;
            },
            processing:true
        };
    

    UPDATED 2: To have keyboard support on the Delete operation and to set “Delete” button as default you can add in the delSettings additional option

    afterShowForm: function($form) {
        var form = $form.parent()[0];
        // Delete button: "#dData", Cancel button: "#eData"
        $("#dData",form).attr("tabindex","1000");
        $("#eData",form).attr("tabindex","1001");
        setTimeout(function() {
            $("#dData",form).focus(); // set the focus on "Delete" button
        },50);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

jqGrid delete action button is used to delete row. This button click calls Edit
When i'm using the parameter loadonce: true in my jqGrid, when I'm getting this
I am using jqGrid ( http://www.trirand.com/blog/ ) to display some read-only data. The resizeable
jqgrid is used to show stock status from server. Data is retrieved in json
I've implemented my beautiful jqGrid with multiselect rows so I can delete more than
I have the caption parameter set in the jqGrid definition. I want to know
I have jqGrid 3.5 (full) mostly working. I have it retrieving data with the
I have a jqGrid on a page and users can click a button to
I've setup a jqGrid like this $('#gridTable').jqGrid({ url: '/GridData/', ... Now if I navigate
i have the following code on my aspx page: jQuery(#listFondos).jqGrid({ url: '/PorMyController/LoadGridData/', datatype: 'json',

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.