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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:17:18+00:00 2026-05-29T05:17:18+00:00

At the moment I am doing drag & drop to GridView rows which sends

  • 0

At the moment I am doing drag & drop to GridView rows which sends the new row order to a WebMethod in order to update the database according to these new values.

So, how can I update the GridView in the web form after calling the WebMethod? Considering that I can’t access to any of the webform elements from a WebMethod.

Web Method:

[WebMethod]
public static void GridViewCarriersReorders(string Reorder)
{
    Boolean result;
    string[] ListID = Reorder.Split('|');
    transactions tr = new transactions();
    result = tr.updateLcrPriorities(ListID);
    //updateGridViewCarriers(); //SOMETHING LIKE THIS IS NEEDED TO DO THE BINDING
}

Thanks a lot for your help and comprehension.

UPDATE: This is how I am calling the webmethod:

$.ajax({
    type: "POST",
    url: "lcrP.aspx/GridViewCarriersReorders",
    data: '{"Reorder":"' + strorder + '"}',
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    async: true,
    cache: false,
    success: function (msg) {
        $.jGrowl("The Carriers priority was successfully updated", { theme: "succeeded" });
    }
})
  • 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-29T05:17:19+00:00Added an answer on May 29, 2026 at 5:17 am

    If you put an UpdatePanel around the gridview, you can call a postback only for it:

    success: function (msg) {
            $.jGrowl("The Carriers priority was successfully updated", { theme: "succeeded" });
            __doPostBack('UpdatePanel1', '');
        }
    

    EDIT:
    As you found by yourself, i missed writing that in the OnLoad event you should force databind of the grid:

    void OnLoad(EventArgs e) {
        base.OnLoad(e);
        myGrid.DataBind();
    }
    

    As an alternative, if your grid is bound to a xDataSource control you can disable the viewstate of the grid, and if it will be forced to DataBind at each postback.

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

Sidebar

Related Questions

I am doing a project at the moment and I need an efficient method
I'm doing javascript on a daily basis at the moment. I'm coming from an
HTTP Referer is the way I'm doing it at the moment. As everyone who's
At the moment we use HSQLDB as an embedded database, but we search for
I have a Winforms app that allows the user to drag and drop some
At the moment I'm doing this: gems(id, name, colour, level, effects, source) id is
At the moment I'm doing something like: public virtual String zipcodeRaw { get; set;
I'm at the moment doing some very basic pattern matching with quotations. My code:
I'm working through Real World Haskell , and at the moment doing the exercises
I'm creating a WCF service which, at the moment, exposing a number of contracts

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.