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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:42:53+00:00 2026-05-18T06:42:53+00:00

I implemented clickable rows in datagrid using ajax. The problem is, when I click

  • 0

I implemented clickable rows in datagrid using ajax. The problem is, when I click the row in the Results page I redirect to another page to view the data. In that page I have an “update” button that I can update the data in the table in the DB and when I click it, I redirect back to the Results page and then click the same row again to view its details, the data isnt updated and its still old data.
The thing is, the data is being updated in the table in the DB, its like the page is saving the old data he brought and using it and I dont know how to tell him to bring new data.

Here is the code to make clickable rows:

protected void pendingGrid_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onclick", "return GetDataUsingAJAX(" + e.Row.RowIndex + ",'pending');");
            e.Row.Attributes.Add("style", "cursor:hand");
        }
    }

here is the javascript of Results page:

function GetDataUsingAJAX(row, table) {
        obj = new XMLHttpRequest();
        if (obj != null) {
            obj.onreadystatechange = RedirectToViewDetails;
            obj.open("GET", "Results2.aspx?row=" + row + "&table=" + table, true);
            obj.send(null);
        }
        return false;
    }


    function RedirectToViewDetails() {

        if (obj.readyState == 4) {
            if (obj.status == 200) {
                var retval = obj.responseText.split("&");
                window.location = "YellowCardStart.aspx?mode=" + retval[0] + "&cntct=" + retval[1] + "&strtDate=" + retval[2] + "&endDate=" + retval[3] + "&strtTime=" + retval[4] + "&endTime=" + retval[5] + "&tools=" + retval[6] + "&id=" + retval[7] + "&table=" + retval[8] + "&bldng=" + retval[9] + "&loc=" + retval[10] + "&devTool=" + retval[11] + "&cmpny=" + retval[12] + "&phn=" + retval[13] + "&lssApp=" + retval[14] + "&ehsApp=" + retval[15] + "&cmnts=" + retval[16] + "&created=" + retval[17];             }
            else {
                alert("Error retrieving data!");
            }
        }
    }

And here is the code in page_load of Results:

if (Request.QueryString["row"] != null)
        {
            Response.Clear();
            if (Request.QueryString["table"] != null)
            {
                DataTable dt = new DataTable();
                if (Request.QueryString["table"] == "fa")
                {
                    dt = DataAccessLayer.selectFromTable(Int32.Parse(activeFAGrid.Rows[Int16.Parse(Request.QueryString["row"])].Cells[0].Text), "active");
                    Response.Write(dt.Rows[0][1].ToString() + "&" + dt.Rows[0][2].ToString() + "&" + dt.Rows[0][3].ToString() + "&" + dt.Rows[0][4].ToString() + "&" + dt.Rows[0][5].ToString() + "&" + dt.Rows[0][6].ToString() + "&" + dt.Rows[0][7].ToString() + "&" + dt.Rows[0][0].ToString() + "&" + "active" + "&" + dt.Rows[0][8].ToString() + "&" + dt.Rows[0][9].ToString() + "&" + dt.Rows[0][10].ToString() + "&" + dt.Rows[0][11].ToString() + "&" + dt.Rows[0][12].ToString() + "&" + dt.Rows[0][13].ToString() + "&" + dt.Rows[0][14].ToString() + "&" + dt.Rows[0][15].ToString() + "&" + dt.Rows[0][16].ToString());
                }
Response.End();
            }
        }

the SelectFromTable function retrieves the data from the DB.

Help will be really appriciated, I am really lost.

Thanks in advance,

Greg

  • 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-18T06:42:54+00:00Added an answer on May 18, 2026 at 6:42 am

    I think you will find that your browser is caching the response from your AJAX call, try using POST instead of GET for your AJAX call.

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

Sidebar

Related Questions

I've implemented the clickable table cell using a extended class. However, when I call
I implemented some code using backbone.js in Asp.NEt MVC3 and found backbone.js very helpful.
I've implemented a clickable Gtk::Image in my application by wrapping it in a Gtk::EventBox
I have a custom list view implemented with Baseadapter. My dataset includes a string
I have a form with n multiple choice questions implemented as radio buttons (using
is it possible in android to make text view clickable if yes then how
I subclassed my navigation bar, making the title view clickable. When clicked, it will
I'm trying to implement clickable areas on the root window, using python xlib's RECORD
I've created a UITableview with sections that are clickable. When you click on them,
I have a ListView whose rows are formatted by me. Each row has 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.