Studio for iPhone

C1Button Autopostback

  •  DCSSRL said 2 years ago:

    Hi,

    I’ve a C1Button and a C1GridView on a WebForm, and clicking on the button I need to update the grid content. So far I’ve enabled the AutoPostBack property on the button, and then using the Click event, I’m able to do what I want. The problem is that with this method on every click the page reloads itself…
    I’v thinked about using client-side methods, with a PageMethod call, but assuming this I don’t have access to the instance controls (e.g. the gridview), as the webmethod must be static.
    Is there any way to do what I want without the page reloading every time?

    thanks in advance,
    Juri

  •  AbdiasM14p said 1 year, 12 months ago:

    Hi

    If you do not want the entire page to reload and still update the grid content, you can use the Ajax UpdatePanel control. You can find it under the Ajax Extensions tab in VisualStudio’s Toolbox. Place the C1Button and C1GridView inside the UpdatePanel and set C1Button as a Trigger. Now when you click on C1Button, it’ll reload only the Update Panel and not the entire page.
    For more info on how to use the UpdatePanel, please refer to the following links:

    http://ajax.net-tutorials.com/controls/updatepanel-control/

    http://msdn.microsoft.com/en-us/library/bb386454.aspx

    Regards
    Abdias

    Answer
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.