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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:22:33+00:00 2026-06-16T08:22:33+00:00

I have the following grid: $(function(){ $(#poGrid).jqGrid({ url:’URL’, datatype: ‘json’, mtype: ‘GET’, colNames:[], pager:

  • 0

I have the following grid:

        $(function(){

        $("#poGrid").jqGrid({
            url:'URL',
            datatype: 'json',
            mtype: 'GET',
            colNames:[],
            pager: '#poPager',
            rowNum:10,
            rowList:[10,20,30],
            sortname: 'orderID',
            sortorder: 'ASC',
            jsonReader : { repeatitems: false },
            viewrecords: true,
            gridview: true,
            caption: ' ',
            multiselect: true,
            height: "100%",

            colModel :[

                {name:'orderID', label:'Order ID', width:80, align: 'center'},
                {name:'orderName', label:'Order Name', width:250},
                {name:'countTotal', label:'Count Total', width:80},
                {name:'orderTotal', label:'Order Total', width:80},
                {name:'orderDate', label:'Order Date', width:100}

            ],

                onSelectRow: function(id){

                    var grid = jQuery('#poGrid');
                    var sel_row = grid.jqGrid('getGridParam', 'selrow');
                    var sel_id = grid.jqGrid('getCell', sel_row, 'orderID');

                    setOrderIDs(id,sel_id);

                }

        });

I am just trying to figure out if the row that triggered the onSelectRow was selected or deselected before I run the setOrderIDs function. If it was trigged by a deselect I do not want to run the function.

Any help on this would be great.

Thanks!

  • 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-16T08:22:34+00:00Added an answer on June 16, 2026 at 8:22 am

    It’s very easy. You should test the value of the second boolean parameter of onSelectRow: status

    onSelectRow: function (id, status) {
        if (status) {
            // row is selected
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following call to load a grid: $(#searchlist).jqGrid({ url:'./searchlibrary', datatype: 'json', mtype:
I have the following inline editable grid var lastsel; $(#mygrid).jqGrid({ data:JqgridResponse.rows, datatype: local, colNames:['DATE',
We have a grid with datatype json. We have the following custom formatter: function
Suppose I have the following (shortened for simplicity): jQuery(#grid).jqGrid({ ... ondblClickRow: function() { //
Suppose I have the following (shortened for simplicity): jQuery(#grid).jqGrid({ ... ondblClickRow: function(rowid) { //
I have the following code: $('input.update-grid', $form) .each(function () { var id = this.id.replace('modal',
Edit to answer: I have tried the following $(document).ajaxSuccess (function(ev, xhr, s) { document.write('url:
I have the following JQ-Grid with a formatter function which returns some HTML as
I have following user control: <UserControl.Resources> <Style TargetType=HeaderedItemsControl> <Setter Property=Template> <Setter.Value> <ControlTemplate TargetType=HeaderedItemsControl> <Grid>
I have the following code to filter a grid from values inputed in a

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.