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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:50:43+00:00 2026-05-29T07:50:43+00:00

I have simple JqGrid $j(#gridTemp).jqGrid({ jsonReader: { id: ‘AppID’ + ‘Name’, repeatitems: false },

  • 0

I have simple JqGrid

  $j("#gridTemp").jqGrid({
    jsonReader: {
        id: 'AppID' + 'Name',
        repeatitems: false
    },
    url: GetData,
    datatype: "json",
    colNames: ['Col1', 'Col2'],
    colModel: [
                { name: 'Col1'},
              { name: 'Col2'}
            ],
    rowNum: 10,
    autowidth: true,
    rowList: [10, 20, 30],
    pager: '#pager1',
    }).navGrid('#pager1', { edit: false, add: false, del: true, search: false }, {}, {}, { url: DeleteAddress });

}

and trying to get delete button click event

$j('#del_gridTemp').click(function () { 
        alert($j('#gridTemp').jqGrid('getGridParam', 'selarrrow')); 
    });

for some reason its not working. Any help appriciated.

  • 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-29T07:50:44+00:00Added an answer on May 29, 2026 at 7:50 am

    I don’t know what is the error, but I hope the demo will help you.

    First you use selarrrow parameter, so I suppose you want to have multiselect grid. So I added multiselect: true parameter in the code. You original code with $('#del_gridTemp').click(function () {...}); works in my demo. I modified just the text of the alerts. If you for example select rows having “test4”, “test2”, “test12” you will see first the message like

    enter image description here

    after you click “OK” button and then “Delete” button in the confirmation dialog you will see the next message

    enter image description here

    from the onclickSubmit callback function which I recommend you to use. To code looks like

    $("#gridTemp").jqGrid('navGrid', '#pager', {refreshstate: 'current', add: false, edit: false, del: true},
        {},
        {},
        { url: '/DeleteAddress',
            onclickSubmit: function (options, postdata) {
                alert('in onclickSubmit: postdata=' + postdata);
                return { myData: 'Hello'};
            }});
    

    Inside of onclickSubmit method I show additionally how to append the information which will be sent with additional information.

    I don’t have any server code under the URL ‘/DeleteAddress’, but in any tools like Fiddler of Firebug you will be able to the the format of data which will be posted. It’s the data in x-www-form-urlencoded form:

    myData=Hello&oper=del&id=4%2C2%2C12
    

    which are in decoded form:

    myData=Hello
    oper=del
    id=4,2,12
    

    I think it should be close to what you need.

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

Sidebar

Related Questions

I have simple form. <form target=_blank action=somescript.php method=Post id=simpleForm> <input type=hidden name=url value=http://...> <input
Here's a simple question. I have a jqGrid that's working great but I want
I am using jqgrid and have simple searching enabled. I am wondering if there
I have a simple custom user control that uses jqGrid. the control is as
I have a jqGrid (4.1.1) using a simple subgrid. When a record is plus-ed
I have simple code that does a head request for a URL and then
I have implemented a simple jqGrid in my ASP.NET MVC 3 application. It shows
I have simple regex \.*\ for me its says select everything between and ,
I have simple win service, that executes few tasks periodically. How should I pass
i have simple regular expression: ^123$ Matches are for example 123 1234 etc. How

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.