locked
AspxGridView reload page when updating row RRS feed

  • Question

  • User209532179 posted

    Hi all.

    I have an AspxGridView and a related chart.

    What I want to do is that when users edits data in the grid, the chart is updated according to the data changes.

    As long as the grid from devexpress makes everything using ajax, I don't know how to launch a full page load so my chart gets updated.

    Any idea?

    Monday, October 4, 2010 6:59 AM

Answers

  • User-1364446067 posted

    If i understood your problem correctly, then you can use "__doPostBack(eventTarget, eventArgument)" for full page load.

    Its a client side event and you can also make a call to it from server side.Its definition is given here. The eventTarget and eventArgument you supply will be accessible by you in the page_load event when the page will have a full postback.

    function __doPostBack(eventTarget, eventArgument) {
    var theform = document.Form1;
    theform.__EVENTTARGET.value = eventTarget;
    theform.__EVENTARGUMENT.value = eventArgument;
    theform.submit();
    }


    Also read this article for reference.

    http://www.c-sharpcorner.com/uploadfile/jaishmathews/dopostback01292006042750am/dopostback.aspx



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 4, 2010 7:29 AM
  • User-1364446067 posted

    Yeah thats a good technique too. You can use a non-displayable button inside your any update panel and can click it from client side using its .click() method. And you'd get that update panel posted back.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 5, 2010 3:59 AM

All replies

  • User-1364446067 posted

    If i understood your problem correctly, then you can use "__doPostBack(eventTarget, eventArgument)" for full page load.

    Its a client side event and you can also make a call to it from server side.Its definition is given here. The eventTarget and eventArgument you supply will be accessible by you in the page_load event when the page will have a full postback.

    function __doPostBack(eventTarget, eventArgument) {
    var theform = document.Form1;
    theform.__EVENTTARGET.value = eventTarget;
    theform.__EVENTARGUMENT.value = eventArgument;
    theform.submit();
    }


    Also read this article for reference.

    http://www.c-sharpcorner.com/uploadfile/jaishmathews/dopostback01292006042750am/dopostback.aspx



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 4, 2010 7:29 AM
  • User209532179 posted

    Hello.

    Your solution worked.

    At the end I 've used a different approach I found here (http://community.devexpress.com/forums/p/60866/205996.aspx) so I just refresh an updatePanel containing the chart, not the whole page.

    It is not very elegant but it seems to work.

    Regards

    Monday, October 4, 2010 10:26 AM
  • User-1364446067 posted

    Yeah thats a good technique too. You can use a non-displayable button inside your any update panel and can click it from client side using its .click() method. And you'd get that update panel posted back.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 5, 2010 3:59 AM
  • User209532179 posted

    And then there is no need for the hidden fields and the triggers in the update panel.

    Thank you again :) !

    Tuesday, October 5, 2010 4:02 AM
  • User-1364446067 posted

    You got it :)

    Wednesday, October 6, 2010 12:57 AM