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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:27:46+00:00 2026-06-18T10:27:46+00:00

When a user selects a cell, I have the following code which goes to

  • 0

When a user selects a cell, I have the following code which goes to a window.location

                 beforeSelectRow: function (rowid, e) {
                 var $td = $(e.target).closest("td"),
                 iCol = $.jgrid.getCellIndex($td[0]);
                 if (this.p.colModel[iCol].name === 'FlSaved') {
                 var pagenum = $('#reportList').getGridParam('page');
                 var rownum = 200;
                     alert(pagenum);
                     alert(rownum);
                 window.location = "/Plt/FileUpload/" + '?id=' + encodeURIComponent(rowid) + '&pagenum=' + pagenum;
                 }

Note how I am passing the pagenum. The reason why I am passing the page number is because when the user finishes with what they need
to do at window.location, I need the user to go back to the grid page that they were at.

To do this, I am doing the loadComplete where I set the value of the page but does not seem to be working.

      loadComplete: function (data) {

      if ('@TempData["pageNum"]') {

         $("#rpList").trigger("reloadGrid",[{page:pagenum}]);
} 

Where is the best place of do the trigger reloadGrid at?

  • 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-18T10:27:47+00:00Added an answer on June 18, 2026 at 10:27 am

    It’s unclear for me when '@TempData["pageNum"]' will be set, when it will be cleared and whether the code will be hold in the cache of the web browser. If we forget about the questions I have one important remark to your code: if you use .trigger("reloadGrid", ...) inside of loadComplete you should place the call of trigger inside of setTimeout. It will allows to process till the end the current loadiong of the grid before starting the next loading initialized by .trigger("reloadGrid", ...). So the code could be about the following:

    loadComplete: function (data) {
        ...
        if (/*some condition*/) {
            setTimeout(function () {
                $(this).trigger("reloadGrid",[{page: pagenum}]);
            }, 50);
        }
        ...
    }
    

    Event the usage of 0 instead of 50 is not the same as the usage of .trigger("reloadGrid",...) without setTimeout.

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

Sidebar

Related Questions

I have the following code in SQL (2005) which calculates the avarage user logins
I have the following code which works perfectly but I need an onblur statement
I have a custom cell and when the user selects that cell, I would
I have a tableview, where when the user selects the cell it will set
Is the following easy to code? I have a tableview and when the user
I have the following C# code, which pulls data from a database & populates
I have a table view and when a user selects a cell I want
I have two UITableViewControllers. In the first UITableView, once a user selects a cell,
I have this function which is trying to detect when a particular cell value
I have a DataGrid (the official one) with SelectionUnit=Cell . When the user selects

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.